OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{RelAlgExecutor.cpp}::anonymous_namespace{RelAlgExecutor.cpp} Namespace Reference

Functions

void conditionally_change_arg_to_int_type (size_t target_expr_idx, std::shared_ptr< Analyzer::Expr > &target_expr, std::unordered_map< size_t, SQLTypeInfo > &target_exprs_type_infos)
 

Function Documentation

void anonymous_namespace{RelAlgExecutor.cpp}::anonymous_namespace{RelAlgExecutor.cpp}::conditionally_change_arg_to_int_type ( size_t  target_expr_idx,
std::shared_ptr< Analyzer::Expr > &  target_expr,
std::unordered_map< size_t, SQLTypeInfo > &  target_exprs_type_infos 
)

Definition at line 1855 of file RelAlgExecutor.cpp.

References CHECK, SQLTypeInfo::get_compression(), get_int_type_by_size(), SQLTypeInfo::get_notnull(), SQLTypeInfo::get_size(), SQLTypeInfo::get_type(), kARRAY, kENCODING_DATE_IN_DAYS, and Analyzer::Expr::set_type_info().

Referenced by anonymous_namespace{RelAlgExecutor.cpp}::translate_targets().

1858  {
1859  auto* agg_expr = dynamic_cast<Analyzer::AggExpr*>(target_expr.get());
1860  CHECK(agg_expr);
1861  if (agg_expr->get_is_distinct()) {
1862  SQLTypeInfo const& ti = agg_expr->get_arg()->get_type_info();
1863  if (ti.get_type() != kARRAY && ti.get_compression() == kENCODING_DATE_IN_DAYS) {
1864  target_exprs_type_infos.emplace(target_expr_idx, ti);
1865  target_expr = target_expr->deep_copy();
1866  auto* arg = dynamic_cast<Analyzer::AggExpr*>(target_expr.get())->get_arg();
1868  return;
1869  }
1870  }
1871  target_exprs_type_infos.emplace(target_expr_idx, target_expr->get_type_info());
1872 }
HOST DEVICE int get_size() const
Definition: sqltypes.h:403
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
void set_type_info(const SQLTypeInfo &ti)
Definition: Analyzer.h:80
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399
SQLTypes get_int_type_by_size(size_t const nbytes)
Definition: sqltypes.h:1454
#define CHECK(condition)
Definition: Logger.h:291
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:398

+ Here is the call graph for this function:

+ Here is the caller graph for this function: