17 #ifndef QUERYENGINE_HASHJOINKEYHANDLERS_H
18 #define QUERYENGINE_HASHJOINKEYHANDLERS_H
41 const bool should_skip_entries,
46 const int32_t*
const* sd_inner_to_outer_translation_maps,
47 const int32_t* sd_min_inner_elems
55 if (sd_inner_to_outer_translation_maps) {
56 CHECK(sd_min_inner_elems);
67 template <
typename T,
typename KEY_BUFF_HANDLER>
70 KEY_BUFF_HANDLER
f)
const {
71 bool skip_entry =
false;
73 ++key_component_index) {
74 const auto& join_column_iterator = join_column_iterators[key_component_index];
75 int64_t elem = (*join_column_iterator).element;
77 !join_column_iterator.type_info->uses_bw_eq) {
84 const auto sd_inner_to_outer_translation_map =
87 if (sd_inner_to_outer_translation_map &&
88 elem != join_column_iterator.type_info->null_val) {
90 sd_inner_to_outer_translation_map[elem - sd_min_inner_elem];
99 key_scratch_buff[key_component_index] = elem;
103 return f(join_column_iterators[0].index, key_scratch_buff, key_component_count_);
136 const double* bucket_sizes_for_dimension)
141 template <
typename T,
typename KEY_BUFF_HANDLER>
144 KEY_BUFF_HANDLER
f)
const {
156 for (int64_t x = floor(bounds[0] * x_bucket_sz); x <= floor(bounds[2] * x_bucket_sz);
158 for (int64_t y = floor(bounds[1] * y_bucket_sz);
159 y <= floor(bounds[3] * y_bucket_sz);
161 key_scratch_buff[0] = x;
162 key_scratch_buff[1] = y;
165 f(join_column_iterators[0].index, key_scratch_buff, key_dims_count_);
189 const size_t key_dims_count,
191 const double* bucket_sizes_for_dimension)
197 template <
typename T,
typename KEY_BUFF_HANDLER>
200 KEY_BUFF_HANDLER
f)
const {
206 join_column_iterators->
ptr(), 4, 0));
209 join_column_iterators->
ptr(), 4, 1));
220 key_scratch_buff[0] = floor(coords[0] * x_bucket_sz);
221 key_scratch_buff[1] = floor(coords[1] * y_bucket_sz);
222 const auto err =
f(join_column_iterators[0].index, key_scratch_buff,
key_dims_count_);
244 #endif // QUERYENGINE_HASHJOINKEYHANDLERS_H
DEVICE size_t get_key_component_count() const
const JoinColumn * join_column_per_key_
const size_t key_dims_count_
DEVICE const JoinColumnTypeInfo * get_join_column_type_infos() const
DEVICE double decompress_latitude_coord_geoint32(const int32_t compressed)
const size_t key_component_count_
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)
DEVICE int operator()(JoinColumnIterator *join_column_iterators, T *key_scratch_buff, KEY_BUFF_HANDLER f) const
DEVICE const JoinColumn * get_join_columns() const
DEVICE const JoinColumnTypeInfo * get_join_column_type_infos() const
DEVICE const JoinColumnTypeInfo * get_join_column_type_infos() const
const size_t key_dims_count_
const double * bucket_sizes_for_dimension_
RangeKeyHandler(const bool is_compressed, const size_t key_dims_count, const JoinColumn *join_column, const double *bucket_sizes_for_dimension)
GenericKeyHandler(const size_t key_component_count, const bool should_skip_entries, const JoinColumn *join_column_per_key, const JoinColumnTypeInfo *type_info_per_key, const int32_t *const *sd_inner_to_outer_translation_maps, const int32_t *sd_min_inner_elems)
DEVICE int operator()(JoinColumnIterator *join_column_iterators, T *key_scratch_buff, KEY_BUFF_HANDLER f) const
DEVICE const JoinColumn * get_join_columns() const
static constexpr int32_t INVALID_STR_ID
Iterates over the rows of a JoinColumn across multiple fragments/chunks.
BoundingBoxIntersectKeyHandler(const size_t key_dims_count, const JoinColumn *join_column, const double *bucket_sizes_for_dimension)
const JoinColumn * join_column_
DEVICE size_t get_key_component_count() const
DEVICE const JoinColumn * get_join_columns() const
DEVICE size_t get_number_of_columns() const
DEVICE double decompress_longitude_coord_geoint32(const int32_t compressed)
DEVICE int operator()(JoinColumnIterator *join_column_iterators, T *key_scratch_buff, KEY_BUFF_HANDLER f) const
const JoinColumnTypeInfo * type_info_per_key_
torch::Tensor f(torch::Tensor x, torch::Tensor W_target, torch::Tensor b_target)
const bool is_compressed_
const int32_t *const * sd_inner_to_outer_translation_maps_
DEVICE size_t get_number_of_columns() const
DEVICE NEVER_INLINE double SUFFIX() fixed_width_double_decode_noinline(const int8_t *byte_stream, const int64_t pos)
const JoinColumn * join_column_
const int32_t * sd_min_inner_elems_
DEVICE FORCE_INLINE const int8_t * ptr() const
DEVICE size_t get_key_component_count() const
DEVICE size_t get_number_of_columns() const
const double * bucket_sizes_for_dimension_
const bool should_skip_entries_