OmniSciDB  72c90bc290
 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 1849 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().

1852  {
1853  auto* agg_expr = dynamic_cast<Analyzer::AggExpr*>(target_expr.get());
1854  CHECK(agg_expr);
1855  if (agg_expr->get_is_distinct()) {
1856  SQLTypeInfo const& ti = agg_expr->get_arg()->get_type_info();
1857  if (ti.get_type() != kARRAY && ti.get_compression() == kENCODING_DATE_IN_DAYS) {
1858  target_exprs_type_infos.emplace(target_expr_idx, ti);
1859  target_expr = target_expr->deep_copy();
1860  auto* arg = dynamic_cast<Analyzer::AggExpr*>(target_expr.get())->get_arg();
1862  return;
1863  }
1864  }
1865  target_exprs_type_infos.emplace(target_expr_idx, target_expr->get_type_info());
1866 }
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:1452
#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: