OmniSciDB  c1a53651b2
 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 1890 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().

1893  {
1894  auto* agg_expr = dynamic_cast<Analyzer::AggExpr*>(target_expr.get());
1895  CHECK(agg_expr);
1896  if (agg_expr->get_is_distinct()) {
1897  SQLTypeInfo const& ti = agg_expr->get_arg()->get_type_info();
1898  if (ti.get_type() != kARRAY && ti.get_compression() == kENCODING_DATE_IN_DAYS) {
1899  target_exprs_type_infos.emplace(target_expr_idx, ti);
1900  target_expr = target_expr->deep_copy();
1901  auto* arg = dynamic_cast<Analyzer::AggExpr*>(target_expr.get())->get_arg();
1903  return;
1904  }
1905  }
1906  target_exprs_type_infos.emplace(target_expr_idx, target_expr->get_type_info());
1907 }
HOST DEVICE int get_size() const
Definition: sqltypes.h:393
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:381
void set_type_info(const SQLTypeInfo &ti)
Definition: Analyzer.h:80
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:389
SQLTypes get_int_type_by_size(size_t const nbytes)
Definition: sqltypes.h:1217
#define CHECK(condition)
Definition: Logger.h:291
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:388

+ Here is the call graph for this function:

+ Here is the caller graph for this function: