OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HashJoinRuntime.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 MapD Technologies, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /*
18  * @file HashJoinRuntime.h
19  * @author Alex Suhan <alex@mapd.com>
20  *
21  * Copyright (c) 2015 MapD Technologies, Inc. All rights reserved.
22  */
23 
24 #ifndef QUERYENGINE_HASHJOINRUNTIME_H
25 #define QUERYENGINE_HASHJOINRUNTIME_H
26 
27 #include <cstddef>
28 #include <cstdint>
29 #include <vector>
30 #include "../../../Shared/SqlTypesLayout.h"
31 #include "../../../Shared/sqltypes.h"
32 
33 #ifdef __CUDACC__
34 #include "../../DecodersImpl.h"
35 #else
36 #include "../../RuntimeFunctions.h"
37 #endif
38 #include "../../../Shared/funcannotations.h"
39 
40 struct GenericKeyHandler;
41 struct OverlapsKeyHandler;
42 struct RangeKeyHandler;
43 
44 struct HashEntryInfo {
45  alignas(sizeof(int64_t)) size_t hash_entry_count;
46  alignas(sizeof(int64_t)) int64_t bucket_normalization;
47 
48  inline size_t getNormalizedHashEntryCount() const {
50  auto modulo_res = hash_entry_count % static_cast<size_t>(bucket_normalization);
51  auto entry_count = hash_entry_count / static_cast<size_t>(bucket_normalization);
52  if (modulo_res) {
53  return entry_count + 1;
54  }
55  return entry_count;
56  }
57 
58  bool operator!() const { return !(this->getNormalizedHashEntryCount()); }
59 };
60 
62 
63 void init_hash_join_buff(int32_t* buff,
64  const int64_t entry_count,
65  const int32_t invalid_slot_val,
66  const int32_t cpu_thread_idx,
67  const int32_t cpu_thread_count);
68 
69 void init_hash_join_buff_on_device(int32_t* buff,
70  const int64_t entry_count,
71  const int32_t invalid_slot_val);
72 
73 void init_baseline_hash_join_buff_32(int8_t* hash_join_buff,
74  const int64_t entry_count,
75  const size_t key_component_count,
76  const bool with_val_slot,
77  const int32_t invalid_slot_val,
78  const int32_t cpu_thread_idx,
79  const int32_t cpu_thread_count);
80 
81 void init_baseline_hash_join_buff_64(int8_t* hash_join_buff,
82  const int64_t entry_count,
83  const size_t key_component_count,
84  const bool with_val_slot,
85  const int32_t invalid_slot_val,
86  const int32_t cpu_thread_idx,
87  const int32_t cpu_thread_count);
88 
89 void init_baseline_hash_join_buff_on_device_32(int8_t* hash_join_buff,
90  const int64_t entry_count,
91  const size_t key_component_count,
92  const bool with_val_slot,
93  const int32_t invalid_slot_val);
94 
95 void init_baseline_hash_join_buff_on_device_64(int8_t* hash_join_buff,
96  const int64_t entry_count,
97  const size_t key_component_count,
98  const bool with_val_slot,
99  const int32_t invalid_slot_val);
100 
101 enum ColumnType { SmallDate = 0, Signed = 1, Unsigned = 2, Double = 3 };
102 
103 struct JoinChunk {
104  const int8_t*
105  col_buff; // actually from AbstractBuffer::getMemoryPtr() via Chunk_NS::Chunk
106  size_t num_elems;
107 };
108 
109 struct JoinColumn {
110  const int8_t*
111  col_chunks_buff; // actually a JoinChunk* from ColumnFetcher::makeJoinColumn()
113  size_t num_chunks;
114  size_t num_elems;
115  size_t elem_sz;
116 };
117 
119  const size_t elem_sz;
120  const int64_t min_val;
121  const int64_t max_val;
122  const int64_t null_val;
123  const bool uses_bw_eq;
124  const int64_t translated_null_val;
126 };
127 
129  if (ti.is_date_in_days()) {
130  return SmallDate;
131  } else {
132  return is_unsigned_type(ti) ? Unsigned : Signed;
133  }
134 }
135 
138  bool is_double; // TODO(adb): assume float otherwise (?)
139 };
140 
141 int fill_hash_join_buff_bucketized(int32_t* buff,
142  const int32_t invalid_slot_val,
143  const bool for_semi_join,
144  const JoinColumn join_column,
145  const JoinColumnTypeInfo type_info,
146  const void* sd_inner,
147  const void* sd_outer,
148  const int32_t cpu_thread_idx,
149  const int32_t cpu_thread_count,
150  const int64_t bucket_normalization);
151 
152 int fill_hash_join_buff(int32_t* buff,
153  const int32_t invalid_slot_val,
154  const bool for_semi_join,
155  const JoinColumn join_column,
156  const JoinColumnTypeInfo type_info,
157  const void* sd_inner,
158  const void* sd_outer,
159  const int32_t cpu_thread_idx,
160  const int32_t cpu_thread_count);
161 
162 void fill_hash_join_buff_on_device(int32_t* buff,
163  const int32_t invalid_slot_val,
164  const bool for_semi_join,
165  int* dev_err_buff,
166  const JoinColumn join_column,
167  const JoinColumnTypeInfo type_info);
168 
170  const int32_t invalid_slot_val,
171  const bool for_semi_join,
172  int* dev_err_buff,
173  const JoinColumn join_column,
174  const JoinColumnTypeInfo type_info,
175  const int64_t bucket_normalization);
176 
177 struct ShardInfo {
178  const size_t shard;
179  const size_t entry_count_per_shard;
180  const size_t num_shards;
181  const int device_count;
182 };
183 
184 void fill_hash_join_buff_on_device_sharded(int32_t* buff,
185  const int32_t invalid_slot_val,
186  const bool for_semi_join,
187  int* dev_err_buff,
188  const JoinColumn join_column,
189  const JoinColumnTypeInfo type_info,
190  const ShardInfo shard_info);
191 
193  const int32_t invalid_slot_val,
194  const bool for_semi_join,
195  int* dev_err_buff,
196  const JoinColumn join_column,
197  const JoinColumnTypeInfo type_info,
198  const ShardInfo shard_info,
199  const int64_t bucket_normalization);
200 
201 void fill_one_to_many_hash_table(int32_t* buff,
202  const HashEntryInfo hash_entry_info,
203  const int32_t invalid_slot_val,
204  const JoinColumn& join_column,
205  const JoinColumnTypeInfo& type_info,
206  const void* sd_inner_proxy,
207  const void* sd_outer_proxy,
208  const unsigned cpu_thread_count);
209 
210 void fill_one_to_many_hash_table_bucketized(int32_t* buff,
211  const HashEntryInfo hash_entry_info,
212  const int32_t invalid_slot_val,
213  const JoinColumn& join_column,
214  const JoinColumnTypeInfo& type_info,
215  const void* sd_inner_proxy,
216  const void* sd_outer_proxy,
217  const unsigned cpu_thread_count);
218 
220  const HashEntryInfo hash_entry_info,
221  const int32_t invalid_slot_val,
222  const JoinColumn& join_column,
223  const JoinColumnTypeInfo& type_info,
224  const ShardInfo& shard_info,
225  const void* sd_inner_proxy,
226  const void* sd_outer_proxy,
227  const unsigned cpu_thread_count);
228 
229 void fill_one_to_many_hash_table_on_device(int32_t* buff,
230  const HashEntryInfo hash_entry_info,
231  const int32_t invalid_slot_val,
232  const JoinColumn& join_column,
233  const JoinColumnTypeInfo& type_info);
234 
236  int32_t* buff,
237  const HashEntryInfo hash_entry_info,
238  const int32_t invalid_slot_val,
239  const JoinColumn& join_column,
240  const JoinColumnTypeInfo& type_info);
241 
243  const HashEntryInfo hash_entry_info,
244  const int32_t invalid_slot_val,
245  const JoinColumn& join_column,
246  const JoinColumnTypeInfo& type_info,
247  const ShardInfo& shard_info);
248 
249 int fill_baseline_hash_join_buff_32(int8_t* hash_buff,
250  const int64_t entry_count,
251  const int32_t invalid_slot_val,
252  const bool for_semi_join,
253  const size_t key_component_count,
254  const bool with_val_slot,
255  const GenericKeyHandler* key_handler,
256  const int64_t num_elems,
257  const int32_t cpu_thread_idx,
258  const int32_t cpu_thread_count);
259 
260 int overlaps_fill_baseline_hash_join_buff_32(int8_t* hash_buff,
261  const int64_t entry_count,
262  const int32_t invalid_slot_val,
263  const size_t key_component_count,
264  const bool with_val_slot,
265  const OverlapsKeyHandler* key_handler,
266  const int64_t num_elems,
267  const int32_t cpu_thread_idx,
268  const int32_t cpu_thread_count);
269 
270 int range_fill_baseline_hash_join_buff_32(int8_t* hash_buff,
271  const size_t entry_count,
272  const int32_t invalid_slot_val,
273  const size_t key_component_count,
274  const bool with_val_slot,
275  const RangeKeyHandler* key_handler,
276  const size_t num_elems,
277  const int32_t cpu_thread_idx,
278  const int32_t cpu_thread_count);
279 
280 int fill_baseline_hash_join_buff_64(int8_t* hash_buff,
281  const int64_t entry_count,
282  const int32_t invalid_slot_val,
283  const bool for_semi_join,
284  const size_t key_component_count,
285  const bool with_val_slot,
286  const GenericKeyHandler* key_handler,
287  const int64_t num_elems,
288  const int32_t cpu_thread_idx,
289  const int32_t cpu_thread_count);
290 
291 int overlaps_fill_baseline_hash_join_buff_64(int8_t* hash_buff,
292  const int64_t entry_count,
293  const int32_t invalid_slot_val,
294  const size_t key_component_count,
295  const bool with_val_slot,
296  const OverlapsKeyHandler* key_handler,
297  const int64_t num_elems,
298  const int32_t cpu_thread_idx,
299  const int32_t cpu_thread_count);
300 
301 int range_fill_baseline_hash_join_buff_64(int8_t* hash_buff,
302  const size_t entry_count,
303  const int32_t invalid_slot_val,
304  const size_t key_component_count,
305  const bool with_val_slot,
306  const RangeKeyHandler* key_handler,
307  const size_t num_elems,
308  const int32_t cpu_thread_idx,
309  const int32_t cpu_thread_count);
310 
311 void fill_baseline_hash_join_buff_on_device_32(int8_t* hash_buff,
312  const int64_t entry_count,
313  const int32_t invalid_slot_val,
314  const bool for_semi_join,
315  const size_t key_component_count,
316  const bool with_val_slot,
317  int* dev_err_buff,
318  const GenericKeyHandler* key_handler,
319  const int64_t num_elems);
320 
321 void fill_baseline_hash_join_buff_on_device_64(int8_t* hash_buff,
322  const int64_t entry_count,
323  const int32_t invalid_slot_val,
324  const bool for_semi_join,
325  const size_t key_component_count,
326  const bool with_val_slot,
327  int* dev_err_buff,
328  const GenericKeyHandler* key_handler,
329  const int64_t num_elems);
330 
332  int8_t* hash_buff,
333  const int64_t entry_count,
334  const int32_t invalid_slot_val,
335  const size_t key_component_count,
336  const bool with_val_slot,
337  int* dev_err_buff,
338  const OverlapsKeyHandler* key_handler,
339  const int64_t num_elems);
340 
342  const int64_t entry_count,
343  const int32_t invalid_slot_val,
344  const size_t key_component_count,
345  const bool with_val_slot,
346  int* dev_err_buff,
347  const RangeKeyHandler* key_handler,
348  const size_t num_elems);
349 
351  int32_t* buff,
352  const int32_t* composite_key_dict,
353  const int64_t hash_entry_count,
354  const int32_t invalid_slot_val,
355  const size_t key_component_count,
356  const std::vector<JoinColumn>& join_column_per_key,
357  const std::vector<JoinColumnTypeInfo>& type_info_per_key,
358  const std::vector<JoinBucketInfo>& join_bucket_info,
359  const std::vector<const void*>& sd_inner_proxy_per_key,
360  const std::vector<const void*>& sd_outer_proxy_per_key,
361  const int32_t cpu_thread_count,
362  const bool is_range_join = false,
363  const bool is_geo_compressed = false);
364 
366  int32_t* buff,
367  const int64_t* composite_key_dict,
368  const int64_t hash_entry_count,
369  const int32_t invalid_slot_val,
370  const size_t key_component_count,
371  const std::vector<JoinColumn>& join_column_per_key,
372  const std::vector<JoinColumnTypeInfo>& type_info_per_key,
373  const std::vector<JoinBucketInfo>& join_bucket_info,
374  const std::vector<const void*>& sd_inner_proxy_per_key,
375  const std::vector<const void*>& sd_outer_proxy_per_key,
376  const int32_t cpu_thread_count,
377  const bool is_range_join = false,
378  const bool is_geo_compressed = false);
379 
381  int32_t* buff,
382  const int32_t* composite_key_dict,
383  const int64_t hash_entry_count,
384  const int32_t invalid_slot_val,
385  const size_t key_component_count,
386  const GenericKeyHandler* key_handler,
387  const int64_t num_elems);
388 
390  int32_t* buff,
391  const int64_t* composite_key_dict,
392  const int64_t hash_entry_count,
393  const int32_t invalid_slot_val,
394  const GenericKeyHandler* key_handler,
395  const int64_t num_elems);
396 
398  int32_t* buff,
399  const int64_t* composite_key_dict,
400  const int64_t hash_entry_count,
401  const int32_t invalid_slot_val,
402  const OverlapsKeyHandler* key_handler,
403  const int64_t num_elems);
404 
406  int32_t* buff,
407  const int64_t* composite_key_dict,
408  const size_t hash_entry_count,
409  const int32_t invalid_slot_val,
410  const RangeKeyHandler* key_handler,
411  const size_t num_elems);
412 
413 void approximate_distinct_tuples(uint8_t* hll_buffer_all_cpus,
414  const uint32_t b,
415  const size_t padded_size_bytes,
416  const std::vector<JoinColumn>& join_column_per_key,
417  const std::vector<JoinColumnTypeInfo>& type_info_per_key,
418  const int thread_count);
419 
421  uint8_t* hll_buffer_all_cpus,
422  std::vector<int32_t>& row_counts,
423  const uint32_t b,
424  const size_t padded_size_bytes,
425  const std::vector<JoinColumn>& join_column_per_key,
426  const std::vector<JoinColumnTypeInfo>& type_info_per_key,
427  const std::vector<JoinBucketInfo>& join_buckets_per_key,
428  const int thread_count);
429 
431  uint8_t* hll_buffer_all_cpus,
432  std::vector<int32_t>& row_counts,
433  const uint32_t b,
434  const size_t padded_size_bytes,
435  const std::vector<JoinColumn>& join_column_per_key,
436  const std::vector<JoinColumnTypeInfo>& type_info_per_key,
437  const std::vector<JoinBucketInfo>& join_buckets_per_key,
438  const bool is_compressed,
439  const int thread_count);
440 
441 void approximate_distinct_tuples_on_device(uint8_t* hll_buffer,
442  const uint32_t b,
443  const GenericKeyHandler* key_handler,
444  const int64_t num_elems);
445 
446 void approximate_distinct_tuples_on_device_overlaps(uint8_t* hll_buffer,
447  const uint32_t b,
448  int32_t* row_counts_buffer,
449  const OverlapsKeyHandler* key_handler,
450  const int64_t num_elems);
451 
452 void compute_bucket_sizes_on_cpu(std::vector<double>& bucket_sizes_for_dimension,
453  const JoinColumn& join_column,
454  const JoinColumnTypeInfo& type_info,
455  const std::vector<double>& bucket_size_thresholds,
456  const int thread_count);
457 
458 void approximate_distinct_tuples_on_device_range(uint8_t* hll_buffer,
459  const uint32_t b,
460  int32_t* row_counts_buffer,
461  const RangeKeyHandler* key_handler,
462  const size_t num_elems,
463  const size_t block_size_x,
464  const size_t grid_size_x);
465 
466 void compute_bucket_sizes_on_device(double* bucket_sizes_buffer,
467  const JoinColumn* join_column,
468  const JoinColumnTypeInfo* type_info,
469  const double* bucket_size_thresholds);
470 
471 #endif // QUERYENGINE_HASHJOINRUNTIME_H
const ColumnType column_type
const size_t num_shards
void fill_hash_join_buff_on_device_bucketized(int32_t *buff, const int32_t invalid_slot_val, const bool for_semi_join, int *dev_err_buff, const JoinColumn join_column, const JoinColumnTypeInfo type_info, const int64_t bucket_normalization)
void init_baseline_hash_join_buff_32(int8_t *hash_join_buff, const int64_t entry_count, const size_t key_component_count, const bool with_val_slot, const int32_t invalid_slot_val, const int32_t cpu_thread_idx, const int32_t cpu_thread_count)
size_t num_elems
void fill_one_to_many_baseline_hash_table_on_device_32(int32_t *buff, const int32_t *composite_key_dict, const int64_t hash_entry_count, const int32_t invalid_slot_val, const size_t key_component_count, const GenericKeyHandler *key_handler, const int64_t num_elems)
void init_baseline_hash_join_buff_on_device_64(int8_t *hash_join_buff, const int64_t entry_count, const size_t key_component_count, const bool with_val_slot, const int32_t invalid_slot_val)
void overlaps_fill_one_to_many_baseline_hash_table_on_device_64(int32_t *buff, const int64_t *composite_key_dict, const int64_t hash_entry_count, const int32_t invalid_slot_val, const OverlapsKeyHandler *key_handler, const int64_t num_elems)
void fill_baseline_hash_join_buff_on_device_32(int8_t *hash_buff, const int64_t entry_count, const int32_t invalid_slot_val, const bool for_semi_join, const size_t key_component_count, const bool with_val_slot, int *dev_err_buff, const GenericKeyHandler *key_handler, const int64_t num_elems)
void fill_hash_join_buff_on_device_sharded(int32_t *buff, const int32_t invalid_slot_val, const bool for_semi_join, int *dev_err_buff, const JoinColumn join_column, const JoinColumnTypeInfo type_info, const ShardInfo shard_info)
const size_t elem_sz
void range_fill_baseline_hash_join_buff_on_device_64(int8_t *hash_buff, const int64_t entry_count, const int32_t invalid_slot_val, const size_t key_component_count, const bool with_val_slot, int *dev_err_buff, const RangeKeyHandler *key_handler, const size_t num_elems)
const int device_count
void fill_one_to_many_baseline_hash_table_32(int32_t *buff, const int32_t *composite_key_dict, const int64_t hash_entry_count, const int32_t invalid_slot_val, const size_t key_component_count, const std::vector< JoinColumn > &join_column_per_key, const std::vector< JoinColumnTypeInfo > &type_info_per_key, const std::vector< JoinBucketInfo > &join_bucket_info, const std::vector< const void * > &sd_inner_proxy_per_key, const std::vector< const void * > &sd_outer_proxy_per_key, const int32_t cpu_thread_count, const bool is_range_join, const bool is_geo_compressed)
const int64_t null_val
void init_baseline_hash_join_buff_64(int8_t *hash_join_buff, const int64_t entry_count, const size_t key_component_count, const bool with_val_slot, const int32_t invalid_slot_val, const int32_t cpu_thread_idx, const int32_t cpu_thread_count)
void fill_one_to_many_hash_table_on_device_sharded(int32_t *buff, const HashEntryInfo hash_entry_info, const int32_t invalid_slot_val, const JoinColumn &join_column, const JoinColumnTypeInfo &type_info, const ShardInfo &shard_info)
std::vector< double > inverse_bucket_sizes_for_dimension
const int8_t * col_buff
#define CHECK_GT(x, y)
Definition: Logger.h:221
void overlaps_fill_baseline_hash_join_buff_on_device_64(int8_t *hash_buff, const int64_t entry_count, const int32_t invalid_slot_val, const size_t key_component_count, const bool with_val_slot, int *dev_err_buff, const OverlapsKeyHandler *key_handler, const int64_t num_elems)
const size_t entry_count_per_shard
const int64_t translated_null_val
void compute_bucket_sizes_on_device(double *bucket_sizes_buffer, const JoinColumn *join_column, const JoinColumnTypeInfo *type_info, const double *bucket_size_thresholds)
void init_baseline_hash_join_buff_on_device_32(int8_t *hash_join_buff, const int64_t entry_count, const size_t key_component_count, const bool with_val_slot, const int32_t invalid_slot_val)
void fill_one_to_many_hash_table_bucketized(int32_t *buff, const HashEntryInfo hash_entry_info, const int32_t invalid_slot_val, const JoinColumn &join_column, const JoinColumnTypeInfo &type_info, const void *sd_inner_proxy, const void *sd_outer_proxy, const unsigned cpu_thread_count)
void approximate_distinct_tuples(uint8_t *hll_buffer_all_cpus, const uint32_t b, const size_t padded_size_bytes, const std::vector< JoinColumn > &join_column_per_key, const std::vector< JoinColumnTypeInfo > &type_info_per_key, const int thread_count)
void approximate_distinct_tuples_on_device_range(uint8_t *hll_buffer, const uint32_t b, int32_t *row_counts_buffer, const RangeKeyHandler *key_handler, const size_t num_elems, const size_t block_size_x, const size_t grid_size_x)
size_t col_chunks_buff_sz
void fill_one_to_many_baseline_hash_table_on_device_64(int32_t *buff, const int64_t *composite_key_dict, const int64_t hash_entry_count, const int32_t invalid_slot_val, const GenericKeyHandler *key_handler, const int64_t num_elems)
void fill_one_to_many_hash_table_on_device(int32_t *buff, const HashEntryInfo hash_entry_info, const int32_t invalid_slot_val, const JoinColumn &join_column, const JoinColumnTypeInfo &type_info)
void compute_bucket_sizes_on_cpu(std::vector< double > &bucket_sizes_for_dimension, const JoinColumn &join_column, const JoinColumnTypeInfo &type_info, const std::vector< double > &bucket_size_thresholds, const int thread_count)
int64_t bucket_normalization
int fill_baseline_hash_join_buff_64(int8_t *hash_buff, const int64_t entry_count, const int32_t invalid_slot_val, const bool for_semi_join, const size_t key_component_count, const bool with_val_slot, const GenericKeyHandler *key_handler, const int64_t num_elems, const int32_t cpu_thread_idx, const int32_t cpu_thread_count)
const size_t shard
size_t hash_entry_count
const int8_t * col_chunks_buff
void init_hash_join_buff_on_device(int32_t *buff, const int64_t entry_count, const int32_t invalid_slot_val)
const int64_t max_val
void range_fill_one_to_many_baseline_hash_table_on_device_64(int32_t *buff, const int64_t *composite_key_dict, const size_t hash_entry_count, const int32_t invalid_slot_val, const RangeKeyHandler *key_handler, const size_t num_elems)
int range_fill_baseline_hash_join_buff_64(int8_t *hash_buff, const size_t entry_count, const int32_t invalid_slot_val, const size_t key_component_count, const bool with_val_slot, const RangeKeyHandler *key_handler, const size_t num_elems, const int32_t cpu_thread_idx, const int32_t cpu_thread_count)
ColumnType
void approximate_distinct_tuples_overlaps(uint8_t *hll_buffer_all_cpus, std::vector< int32_t > &row_counts, const uint32_t b, const size_t padded_size_bytes, const std::vector< JoinColumn > &join_column_per_key, const std::vector< JoinColumnTypeInfo > &type_info_per_key, const std::vector< JoinBucketInfo > &join_buckets_per_key, const int thread_count)
void fill_one_to_many_hash_table(int32_t *buff, const HashEntryInfo hash_entry_info, const int32_t invalid_slot_val, const JoinColumn &join_column, const JoinColumnTypeInfo &type_info, const void *sd_inner_proxy, const void *sd_outer_proxy, const unsigned cpu_thread_count)
bool is_date_in_days() const
Definition: sqltypes.h:858
int overlaps_fill_baseline_hash_join_buff_64(int8_t *hash_buff, const int64_t entry_count, const int32_t invalid_slot_val, const size_t key_component_count, const bool with_val_slot, const OverlapsKeyHandler *key_handler, const int64_t num_elems, const int32_t cpu_thread_idx, const int32_t cpu_thread_count)
int range_fill_baseline_hash_join_buff_32(int8_t *hash_buff, const size_t entry_count, const int32_t invalid_slot_val, const size_t key_component_count, const bool with_val_slot, const RangeKeyHandler *key_handler, const size_t num_elems, const int32_t cpu_thread_idx, const int32_t cpu_thread_count)
bool operator!() const
DEVICE void SUFFIX() init_hash_join_buff(int32_t *groups_buffer, const int64_t hash_entry_count, const int32_t invalid_slot_val, const int32_t cpu_thread_idx, const int32_t cpu_thread_count)
const int64_t min_val
void fill_one_to_many_baseline_hash_table_64(int32_t *buff, const int64_t *composite_key_dict, const int64_t hash_entry_count, const int32_t invalid_slot_val, const size_t key_component_count, const std::vector< JoinColumn > &join_column_per_key, const std::vector< JoinColumnTypeInfo > &type_info_per_key, const std::vector< JoinBucketInfo > &join_bucket_info, const std::vector< const void * > &sd_inner_proxy_per_key, const std::vector< const void * > &sd_outer_proxy_per_key, const int32_t cpu_thread_count, const bool is_range_join, const bool is_geo_compressed)
int overlaps_fill_baseline_hash_join_buff_32(int8_t *hash_buff, const int64_t entry_count, const int32_t invalid_slot_val, const size_t key_component_count, const bool with_val_slot, const OverlapsKeyHandler *key_handler, const int64_t num_elems, const int32_t cpu_thread_idx, const int32_t cpu_thread_count)
size_t getNormalizedHashEntryCount() const
void approximate_distinct_tuples_on_device(uint8_t *hll_buffer, const uint32_t b, const GenericKeyHandler *key_handler, const int64_t num_elems)
void approximate_distinct_tuples_range(uint8_t *hll_buffer_all_cpus, std::vector< int32_t > &row_counts, const uint32_t b, const size_t padded_size_bytes, const std::vector< JoinColumn > &join_column_per_key, const std::vector< JoinColumnTypeInfo > &type_info_per_key, const std::vector< JoinBucketInfo > &join_buckets_per_key, const bool is_compressed, const int thread_count)
ColumnType get_join_column_type_kind(const SQLTypeInfo &ti)
size_t num_chunks
void fill_baseline_hash_join_buff_on_device_64(int8_t *hash_buff, const int64_t entry_count, const int32_t invalid_slot_val, const bool for_semi_join, const size_t key_component_count, const bool with_val_slot, int *dev_err_buff, const GenericKeyHandler *key_handler, const int64_t num_elems)
void fill_hash_join_buff_on_device(int32_t *buff, const int32_t invalid_slot_val, const bool for_semi_join, int *dev_err_buff, const JoinColumn join_column, const JoinColumnTypeInfo type_info)
void fill_one_to_many_hash_table_sharded_bucketized(int32_t *buff, const HashEntryInfo hash_entry_info, const int32_t invalid_slot_val, const JoinColumn &join_column, const JoinColumnTypeInfo &type_info, const ShardInfo &shard_info, const void *sd_inner_proxy, const void *sd_outer_proxy, const unsigned cpu_thread_count)
void fill_one_to_many_hash_table_on_device_bucketized(int32_t *buff, const HashEntryInfo hash_entry_info, const int32_t invalid_slot_val, const JoinColumn &join_column, const JoinColumnTypeInfo &type_info)
int fill_baseline_hash_join_buff_32(int8_t *hash_buff, const int64_t entry_count, const int32_t invalid_slot_val, const bool for_semi_join, const size_t key_component_count, const bool with_val_slot, const GenericKeyHandler *key_handler, const int64_t num_elems, const int32_t cpu_thread_idx, const int32_t cpu_thread_count)
size_t num_elems
const size_t g_maximum_conditions_to_coalesce
void approximate_distinct_tuples_on_device_overlaps(uint8_t *hll_buffer, const uint32_t b, int32_t *row_counts_buffer, const OverlapsKeyHandler *key_handler, const int64_t num_elems)
void fill_hash_join_buff_on_device_sharded_bucketized(int32_t *buff, const int32_t invalid_slot_val, const bool for_semi_join, int *dev_err_buff, const JoinColumn join_column, const JoinColumnTypeInfo type_info, const ShardInfo shard_info, const int64_t bucket_normalization)
DEVICE int SUFFIX() fill_hash_join_buff_bucketized(int32_t *buff, const int32_t invalid_slot_val, const bool for_semi_join, const JoinColumn join_column, const JoinColumnTypeInfo type_info, const void *sd_inner_proxy, const void *sd_outer_proxy, const int32_t cpu_thread_idx, const int32_t cpu_thread_count, const int64_t bucket_normalization)
DEVICE int SUFFIX() fill_hash_join_buff(int32_t *buff, const int32_t invalid_slot_val, const bool for_semi_join, const JoinColumn join_column, const JoinColumnTypeInfo type_info, const void *sd_inner_proxy, const void *sd_outer_proxy, const int32_t cpu_thread_idx, const int32_t cpu_thread_count)
bool is_unsigned_type(const SQLTypeInfo &ti)