22 #ifndef QUERYENGINE_TARGETINFO_H
23 #define QUERYENGINE_TARGETINFO_H
28 #include "../Analyzer/Analyzer.h"
35 const std::shared_ptr<Analyzer::Expr> target_expr) {
44 const std::shared_ptr<Analyzer::Expr> target_expr) {
59 auto result = std::string(
"TargetInfo(");
60 result +=
"is_agg=" + std::string(
is_agg ?
"true" :
"false") +
", ";
91 template <
class Po
interType>
93 const bool bigint_count) {
95 bool notnull = target_expr->get_type_info().get_notnull();
106 is_varlen_projection};
108 const auto agg_type = agg_expr->get_aggtype();
109 const auto agg_arg = agg_expr->get_arg();
112 CHECK(!agg_expr->get_is_distinct());
124 if (agg_expr->get_aggtype() ==
kCOUNT) {
128 if (agg_type ==
kAVG) {
132 agg_expr->get_aggtype(),
143 agg_expr->get_aggtype(),
146 : agg_expr->get_type_info(),
148 agg_type ==
kCOUNT && agg_arg_ti.is_varlen() ?
false : !agg_arg_ti.get_notnull(),
158 return target_info.
is_agg &&
165 #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 SQLTypes get_type() const
bool target_expr_has_varlen_projection(const Analyzer::Expr *target_expr)
bool is_varlen_projection
bool is_varlen_projection(const Analyzer::Expr *target_expr, const SQLTypeInfo &ti)
std::string to_string() const
std::string toString() const
bool is_distinct_target(const TargetInfo &target_info)
const SQLTypeInfo & get_type_info() const
const Analyzer::AggExpr * cast_to_agg_expr(const Analyzer::Expr *target_expr)
Common Enum definitions for SQL processing.
HOST DEVICE bool get_notnull() const
bool is_distinct(const size_t input_idx, const RelAlgNode *node)
bool is_agg_domain_range_equivalent(const SQLAgg &agg_kind)