OmniSciDB  4201147b46
 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 (std::shared_ptr< Analyzer::Expr > &target_expr)
 

Function Documentation

void anonymous_namespace{RelAlgExecutor.cpp}::anonymous_namespace{RelAlgExecutor.cpp}::conditionally_change_arg_to_int_type ( std::shared_ptr< Analyzer::Expr > &  target_expr)

Definition at line 1812 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().

1812  {
1813  auto* agg_expr = dynamic_cast<Analyzer::AggExpr*>(target_expr.get());
1814  CHECK(agg_expr);
1815  if (agg_expr->get_is_distinct()) {
1816  SQLTypeInfo const& ti = agg_expr->get_arg()->get_type_info();
1817  if (ti.get_type() != kARRAY && ti.get_compression() == kENCODING_DATE_IN_DAYS) {
1818  target_expr = target_expr->deep_copy();
1819  auto* arg = dynamic_cast<Analyzer::AggExpr*>(target_expr.get())->get_arg();
1821  }
1822  }
1823 }
HOST DEVICE int get_size() const
Definition: sqltypes.h:339
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:329
void set_type_info(const SQLTypeInfo &ti)
Definition: Analyzer.h:82
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:337
SQLTypes get_int_type_by_size(size_t const nbytes)
Definition: sqltypes.h:1069
#define CHECK(condition)
Definition: Logger.h:222
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:336

+ Here is the call graph for this function:

+ Here is the caller graph for this function: