23 #ifndef QUERYENGINE_SQLTYPESLAYOUT_H
24 #define QUERYENGINE_SQLTYPESLAYOUT_H
41 const auto agg_type = target.
agg_kind;
45 CHECK((shared::is_any<kCOUNT, kCOUNT_IF, kAPPROX_QUANTILE, kMODE>(agg_type)));
47 CHECK((shared::is_any<kCOUNT, kCOUNT_IF, kAPPROX_QUANTILE, kMODE>(agg_type)))
59 auto modified_target_type = target.
sql_type;
61 return modified_target_type;
67 const auto agg_type = target.
agg_kind;
69 if (!shared::is_any<kCOUNT, kCOUNT_IF>(agg_type) ||
agg_arg.get_type() !=
kNULLT) {
88 return inline_int_null_value<int8_t>();
90 return inline_int_null_value<int8_t>();
92 return inline_int_null_value<int16_t>();
94 return inline_int_null_value<int32_t>();
96 return inline_int_null_value<int64_t>();
102 return inline_int_null_value<int64_t>();
105 return inline_int_null_value<int64_t>();
119 return inline_int_null_value<int32_t>();
121 return inline_int_null_value<int16_t>();
124 CHECK(
false) <<
"Unknown encoding width for date in days: "
135 return inline_int_null_value<uint8_t>();
137 return inline_int_null_value<uint16_t>();
139 return inline_int_null_value<int32_t>();
142 CHECK(
false) <<
"Unknown size for dictionary encoded type: " << ti.
get_size();
169 for (
unsigned i = 0; i < exp; ++i) {
179 throw std::runtime_error(
180 "Untyped NULL values are not supported. Please CAST any NULL "
181 "constants to a type.");
201 return sizeof(time_t) * 8;
208 throw std::runtime_error(
"Projecting on unsized array column not supported.");
227 UNREACHABLE() <<
"Unhandled int_type: " << int_type;
236 #endif // QUERYENGINE_SQLTYPESLAYOUT_H
void set_compact_type(TargetInfo &target, const SQLTypeInfo &new_type)
const Analyzer::Expr * agg_arg(const Analyzer::Expr *expr)
HOST DEVICE int get_size() const
bool is_agg_domain_range_equivalent(const SQLAgg agg_kind)
HOST DEVICE SQLTypes get_type() const
double inline_fp_null_val(const SQL_TYPE_INFO &ti)
const SQLTypeInfo get_compact_type(const TargetInfo &target)
size_t get_bit_width(const SQLTypeInfo &ti)
int get_logical_size() const
HOST DEVICE EncodingType get_compression() const
constexpr float inline_fp_null_value< float >()
constexpr double inline_fp_null_value< double >()
HOST DEVICE int get_comp_param() const
uint64_t exp_to_scale(const unsigned exp)
int64_t inline_int_null_val(const SQL_TYPE_INFO &ti)
int64_t inline_fixed_encoding_null_val(const SQL_TYPE_INFO &ti)
SQLTypeInfo get_elem_type() const
bool is_unsigned_type(const SQLTypeInfo &ti)