48 const bool buff_is_provided)
50 , query_mem_desc_(query_mem_desc)
52 , buff_is_provided_(buff_is_provided)
76 const std::vector<TargetInfo>& targets) {
77 std::vector<int64_t> target_init_vals;
78 for (
const auto& target_info : targets) {
79 if (target_info.agg_kind ==
kCOUNT ||
81 target_init_vals.push_back(0);
84 if (!target_info.sql_type.get_notnull()) {
87 target_init_vals.push_back(target_info.is_agg ? init_val : 0);
89 target_init_vals.push_back(target_info.is_agg ? 0xdeadbeef : 0);
91 if (target_info.agg_kind ==
kAVG) {
92 target_init_vals.push_back(0);
93 }
else if (target_info.agg_kind ==
kSAMPLE && target_info.sql_type.is_geometry()) {
94 for (
int i = 1;
i < 2 * target_info.sql_type.get_physical_coord_cols();
i++) {
95 target_init_vals.push_back(0);
97 }
else if (target_info.agg_kind ==
kSAMPLE && target_info.sql_type.is_varlen()) {
98 target_init_vals.push_back(0);
101 return target_init_vals;
105 const int8_t* byte_stream,
108 const auto& type_info = col_lazy_fetch.
type;
109 if (type_info.is_fp()) {
110 if (type_info.get_type() ==
kFLOAT) {
112 return *
reinterpret_cast<const int64_t*
>(may_alias_ptr(&fval));
115 return *
reinterpret_cast<const int64_t*
>(may_alias_ptr(&fval));
118 CHECK(type_info.is_integer() || type_info.is_decimal() || type_info.is_time() ||
119 type_info.is_timeinterval() || type_info.is_boolean() || type_info.is_string() ||
120 type_info.is_array());
123 type_bitwidth = type_info.get_comp_param();
125 type_bitwidth = 8 * type_info.get_size();
127 CHECK_EQ(
size_t(0), type_bitwidth % 8);
129 if (type_info.is_date_in_days()) {
130 val = type_info.get_comp_param() == 16
137 type_info.get_size() < type_info.get_logical_size() &&
138 type_info.get_comp_param())
146 auto encoding = type_info.get_compression();
151 type_info.get_dimension(),
152 type_info.get_scale(),
156 type_info.get_subtype());
DEVICE NEVER_INLINE int64_t SUFFIX() fixed_width_int_decode_noinline(const int8_t *byte_stream, const int32_t byte_width, const int64_t pos)
void addCountDistinctSetPointerMapping(const int64_t remote_ptr, const int64_t ptr)
ResultSetStorage(const std::vector< TargetInfo > &targets, const QueryMemoryDescriptor &query_mem_desc, int8_t *buff, const bool buff_is_provided)
bool takes_float_argument(const TargetInfo &target_info)
int64_t null_val_bit_pattern(const SQLTypeInfo &ti, const bool float_argument_input)
std::unordered_map< int64_t, int64_t > count_distinct_sets_mapping_
int8_t * getUnderlyingBuffer() const
size_t get_bit_width(const SQLTypeInfo &ti)
int64_t lazy_decode(const ColumnLazyFetchInfo &col_lazy_fetch, const int8_t *byte_stream, const int64_t pos)
DEVICE NEVER_INLINE int64_t SUFFIX() fixed_width_unsigned_decode_noinline(const int8_t *byte_stream, const int32_t byte_width, const int64_t pos)
Basic constructors and methods of the row set interface.
std::vector< int64_t > initialize_target_values_for_storage(const std::vector< TargetInfo > &targets)
DEVICE NEVER_INLINE int64_t SUFFIX() fixed_width_small_date_decode_noinline(const int8_t *byte_stream, const int32_t byte_width, const int32_t null_val, const int64_t ret_null_val, const int64_t pos)
int64_t mappedPtr(const int64_t) const
const bool is_lazily_fetched
int64_t inline_int_null_val(const SQL_TYPE_INFO &ti)
int64_t inline_fixed_encoding_null_val(const SQL_TYPE_INFO &ti)
DEVICE NEVER_INLINE float SUFFIX() fixed_width_float_decode_noinline(const int8_t *byte_stream, const int64_t pos)
DEVICE NEVER_INLINE double SUFFIX() fixed_width_double_decode_noinline(const int8_t *byte_stream, const int64_t pos)
Allocate GPU memory using GpuBuffers via DataMgr.