22 #ifndef QUERYENGINE_TARGETINFO_H 23 #define QUERYENGINE_TARGETINFO_H 28 #include "../Analyzer/Analyzer.h" 35 const std::shared_ptr<Analyzer::Expr> target_expr) {
49 auto result = std::string(
"TargetInfo(");
50 result +=
"is_agg=" + std::string(is_agg ?
"true" :
"false") +
", ";
54 result +=
"skip_null_val=" + std::string(skip_null_val ?
"true" :
"false") +
", ";
55 result +=
"is_distinct=" + std::string(is_distinct ?
"true" :
"false") +
")";
78 template <
class Po
interType>
80 const bool bigint_count) {
82 bool notnull = target_expr->get_type_info().get_notnull();
88 const auto agg_type = agg_expr->get_aggtype();
89 const auto agg_arg = agg_expr->get_arg();
92 CHECK(!agg_expr->get_is_distinct());
103 if (agg_expr->get_aggtype() ==
kCOUNT) {
107 if (agg_type ==
kAVG) {
111 agg_expr->get_aggtype(),
121 agg_expr->get_aggtype(),
124 : agg_expr->get_type_info(),
126 agg_type ==
kCOUNT && agg_arg_ti.is_varlen() ? false : !agg_arg_ti.get_notnull(),
135 return target_info.
is_agg &&
142 #endif // QUERYENGINE_TARGETINFO_H const Analyzer::Expr * agg_arg(const Analyzer::Expr *expr)
TargetInfo get_target_info(const PointerType target_expr, const bool bigint_count)
SQLTypeInfo get_logical_type_info(const SQLTypeInfo &type_info)
Constants for Builtin SQL Types supported by OmniSci.
bool takes_float_argument(const TargetInfo &target_info)
HOST DEVICE bool get_notnull() const
std::string to_string() const
bool is_distinct_target(const TargetInfo &target_info)
std::string toString() const
const Analyzer::AggExpr * cast_to_agg_expr(const Analyzer::Expr *target_expr)
const SQLTypeInfo & get_type_info() const
HOST DEVICE SQLTypes get_type() const
Common Enum definitions for SQL processing.
bool is_agg_domain_range_equivalent(const SQLAgg &agg_kind)