OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HashJoin.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, 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 #pragma once
18 
19 #include <llvm/IR/Value.h>
20 #include <cstdint>
21 #include <set>
22 #include <string>
23 
24 #include "Analyzer/Analyzer.h"
33 #include "Shared/DbObjectKeys.h"
34 #include "StringOps/StringOpInfo.h"
35 
36 class CodeGenerator;
37 
38 class JoinHashTableTooBig : public std::runtime_error {
39  public:
40  JoinHashTableTooBig(size_t cur_hash_table_size, size_t threshold_size)
41  : std::runtime_error("The size of hash table is larger than a threshold (" +
42  ::toString(cur_hash_table_size) + " > " +
43  ::toString(threshold_size) + ")") {}
44 };
45 
46 class TooManyHashEntries : public std::runtime_error {
47  public:
49  : std::runtime_error("Hash tables with more than 4B entries not supported yet") {}
50 
51  TooManyHashEntries(const std::string& reason) : std::runtime_error(reason) {}
52 };
53 
54 class TableMustBeReplicated : public std::runtime_error {
55  public:
56  TableMustBeReplicated(const std::string& table_name)
57  : std::runtime_error("Hash join failed: Table '" + table_name +
58  "' must be replicated.") {}
59 };
60 
61 enum class InnerQualDecision { IGNORE = 0, UNKNOWN, LHS, RHS };
62 
63 #ifndef __CUDACC__
64 inline std::ostream& operator<<(std::ostream& os, InnerQualDecision const decision) {
65  constexpr char const* strings[]{"IGNORE", "UNKNOWN", "LHS", "RHS"};
66  return os << strings[static_cast<int>(decision)];
67 }
68 #endif
69 
70 class HashJoinFail : public std::runtime_error {
71  public:
72  HashJoinFail(const std::string& err_msg)
73  : std::runtime_error(err_msg), inner_qual_decision(InnerQualDecision::UNKNOWN) {}
74  HashJoinFail(const std::string& err_msg, InnerQualDecision qual_decision)
75  : std::runtime_error(err_msg), inner_qual_decision(qual_decision) {}
76 
78 };
79 
81  public:
82  NeedsOneToManyHash() : HashJoinFail("Needs one to many hash") {}
83 };
84 
86  public:
88  : HashJoinFail("Not enough memory for columns involved in join") {}
89 };
90 
92  public:
93  FailedToJoinOnVirtualColumn() : HashJoinFail("Cannot join on rowid") {}
94 };
95 
97  public:
98  TooBigHashTableForBoundingBoxIntersect(const size_t bbox_intersect_hash_table_max_bytes)
99  : HashJoinFail(
100  "Could not create hash table for bounding box intersection with less than "
101  "max allowed size of " +
102  std::to_string(bbox_intersect_hash_table_max_bytes) + " bytes") {}
103 };
104 
105 using InnerOuter = std::pair<const Analyzer::ColumnVar*, const Analyzer::Expr*>;
106 using InnerOuterStringOpInfos = std::pair<std::vector<StringOps_Namespace::StringOpInfo>,
107  std::vector<StringOps_Namespace::StringOpInfo>>;
108 
110  const std::vector<JoinColumn> join_columns;
111  const std::vector<JoinColumnTypeInfo> join_column_types;
112  const std::vector<std::shared_ptr<Chunk_NS::Chunk>> chunks_owner;
113  std::vector<JoinBucketInfo> join_buckets;
114  const std::vector<std::shared_ptr<void>> malloc_owner;
115 
116  void setBucketInfo(const std::vector<double>& bucket_sizes_for_dimension,
117  const std::vector<InnerOuter> inner_outer_pairs);
118 };
119 
121  llvm::Value* elements;
122  llvm::Value* count;
123  llvm::Value* slot;
124 };
125 
127  std::vector<const void*> sd_inner_proxy_per_key;
128  std::vector<void*> sd_outer_proxy_per_key;
129  std::vector<ChunkKey> cache_key_chunks; // used for the cache key
130 };
131 
132 class DeviceAllocator;
133 
134 class HashJoin {
135  public:
136  static constexpr size_t MAX_NUM_HASH_ENTRIES = size_t(1) << 31;
137  virtual std::string toString(const ExecutorDeviceType device_type,
138  const int device_id = 0,
139  bool raw = false) const = 0;
140 
141  virtual std::string toStringFlat64(const ExecutorDeviceType device_type,
142  const int device_id) const;
143 
144  virtual std::string toStringFlat32(const ExecutorDeviceType device_type,
145  const int device_id) const;
146 
147  virtual DecodedJoinHashBufferSet toSet(const ExecutorDeviceType device_type,
148  const int device_id) const = 0;
149 
150  virtual llvm::Value* codegenSlot(const CompilationOptions&, const size_t) = 0;
151 
153  const size_t) = 0;
154 
155  virtual shared::TableKey getInnerTableId() const noexcept = 0;
156 
157  virtual int getInnerTableRteIdx() const noexcept = 0;
158 
159  virtual HashType getHashType() const noexcept = 0;
160 
161  static size_t getMaximumNumHashEntriesCanHold(MemoryLevel memory_level,
162  const Executor* executor,
163  size_t rowid_size) noexcept;
164 
165  static std::string generateTooManyHashEntriesErrMsg(size_t num_entries,
166  size_t threshold,
167  MemoryLevel memory_level) {
168  std::ostringstream oss;
169  oss << "Hash tables with more than " << threshold
170  << " entries (# hash entries: " << num_entries << ") on "
171  << ::toString(memory_level) << " not supported yet";
172  return oss.str();
173  }
174 
175  static bool layoutRequiresAdditionalBuffers(HashType layout) noexcept {
176  return (layout == HashType::ManyToMany || layout == HashType::OneToMany);
177  }
178 
179  static std::string getHashTypeString(HashType ht) noexcept {
180  const char* HashTypeStrings[3] = {"OneToOne", "OneToMany", "ManyToMany"};
181  return HashTypeStrings[static_cast<int>(ht)];
182  };
183 
185  const std::vector<llvm::Value*>& hash_join_idx_args_in,
186  const bool is_sharded,
187  const bool col_is_nullable,
188  const bool is_bw_eq,
189  const int64_t sub_buff_size,
190  Executor* executor,
191  const bool is_bucketized = false);
192 
193  static llvm::Value* codegenHashTableLoad(const size_t table_idx, Executor* executor);
194 
195  virtual Data_Namespace::MemoryLevel getMemoryLevel() const noexcept = 0;
196 
197  virtual int getDeviceCount() const noexcept = 0;
198 
199  virtual size_t offsetBufferOff() const noexcept = 0;
200 
201  virtual size_t countBufferOff() const noexcept = 0;
202 
203  virtual size_t payloadBufferOff() const noexcept = 0;
204 
205  virtual std::string getHashJoinType() const = 0;
206 
207  virtual bool isBitwiseEq() const = 0;
208 
210  const Analyzer::ColumnVar* hash_col,
211  const std::vector<Fragmenter_Namespace::FragmentInfo>& fragment_info,
212  const Data_Namespace::MemoryLevel effective_memory_level,
213  const int device_id,
214  std::vector<std::shared_ptr<Chunk_NS::Chunk>>& chunks_owner,
215  DeviceAllocator* dev_buff_owner,
216  std::vector<std::shared_ptr<void>>& malloc_owner,
217  Executor* executor,
218  ColumnCacheMap* column_cache);
219 
221  static std::shared_ptr<HashJoin> getInstance(
222  const std::shared_ptr<Analyzer::BinOper> qual_bin_oper,
223  const std::vector<InputTableInfo>& query_infos,
224  const Data_Namespace::MemoryLevel memory_level,
225  const JoinType join_type,
226  const HashType preferred_hash_type,
227  const int device_count,
228  ColumnCacheMap& column_cache,
229  Executor* executor,
230  const HashTableBuildDagMap& hashtable_build_dag_map,
231  const RegisteredQueryHint& query_hint,
232  const TableIdToNodeMap& table_id_to_node_map);
233 
235  static std::shared_ptr<HashJoin> getSyntheticInstance(
236  std::string_view table1,
237  std::string_view column1,
238  const Catalog_Namespace::Catalog& catalog1,
239  std::string_view table2,
240  std::string_view column2,
241  const Catalog_Namespace::Catalog& catalog2,
242  const Data_Namespace::MemoryLevel memory_level,
243  const HashType preferred_hash_type,
244  const int device_count,
245  ColumnCacheMap& column_cache,
246  Executor* executor);
247 
249  static std::shared_ptr<HashJoin> getSyntheticInstance(
250  const std::shared_ptr<Analyzer::BinOper> qual_bin_oper,
251  const Data_Namespace::MemoryLevel memory_level,
252  const HashType preferred_hash_type,
253  const int device_count,
254  ColumnCacheMap& column_cache,
255  Executor* executor);
256 
257  static std::pair<std::string, std::shared_ptr<HashJoin>> getSyntheticInstance(
258  std::vector<std::shared_ptr<Analyzer::BinOper>>,
259  const Data_Namespace::MemoryLevel memory_level,
260  const HashType preferred_hash_type,
261  const int device_count,
262  ColumnCacheMap& column_cache,
263  Executor* executor);
264 
265  static shared::TableKey getInnerTableId(
266  const std::vector<InnerOuter>& inner_outer_pairs) {
267  CHECK(!inner_outer_pairs.empty());
268  const auto first_inner_col = inner_outer_pairs.front().first;
269  return first_inner_col->getTableKey();
270  }
271 
272  static bool canAccessHashTable(bool allow_hash_table_recycling,
273  bool invalid_cache_key,
274  JoinType join_type);
275 
276  static void checkHashJoinReplicationConstraint(const shared::TableKey& table_key,
277  const size_t shard_count,
278  const Executor* executor);
279 
280  // Swap the columns if needed and make the inner column the first component.
281  static std::pair<InnerOuter, InnerOuterStringOpInfos> normalizeColumnPair(
282  const Analyzer::Expr* lhs,
283  const Analyzer::Expr* rhs,
284  const TemporaryTables* temporary_tables,
285  const bool is_bbox_intersect = false);
286 
287  template <typename T>
288  static const T* getHashJoinColumn(const Analyzer::Expr* expr);
289 
290  // Normalize each expression tuple
291  static std::pair<std::vector<InnerOuter>, std::vector<InnerOuterStringOpInfos>>
292  normalizeColumnPairs(const Analyzer::BinOper* condition,
293  const TemporaryTables* temporary_tables);
294 
295  HashTable* getHashTableForDevice(const size_t device_id) const {
296  CHECK_LT(device_id, hash_tables_for_device_.size());
297  return hash_tables_for_device_[device_id].get();
298  }
299 
300  size_t getJoinHashBufferSize(const ExecutorDeviceType device_type) {
301  CHECK(device_type == ExecutorDeviceType::CPU);
302  return getJoinHashBufferSize(device_type, 0);
303  }
304 
305  size_t getJoinHashBufferSize(const ExecutorDeviceType device_type,
306  const int device_id) const {
307  auto hash_table = getHashTableForDevice(device_id);
308  if (!hash_table) {
309  return 0;
310  }
311  return hash_table->getHashTableBufferSize(device_type);
312  }
313 
314  int8_t* getJoinHashBuffer(const ExecutorDeviceType device_type,
315  const int device_id) const {
316  // TODO: just make device_id a size_t
317  CHECK_LT(size_t(device_id), hash_tables_for_device_.size());
318  if (!hash_tables_for_device_[device_id]) {
319  return nullptr;
320  }
321  CHECK(hash_tables_for_device_[device_id]);
322  auto hash_table = hash_tables_for_device_[device_id].get();
323 #ifdef HAVE_CUDA
324  if (device_type == ExecutorDeviceType::CPU) {
325  return hash_table->getCpuBuffer();
326  } else {
327  CHECK(hash_table);
328  const auto gpu_buff = hash_table->getGpuBuffer();
329  return gpu_buff;
330  }
331 #else
332  CHECK(device_type == ExecutorDeviceType::CPU);
333  return hash_table->getCpuBuffer();
334 #endif
335  }
336 
338  auto empty_hash_tables =
340  hash_tables_for_device_.swap(empty_hash_tables);
341  }
342 
343  static std::vector<int> collectFragmentIds(
344  const std::vector<Fragmenter_Namespace::FragmentInfo>& fragments);
345 
347  const std::vector<InnerOuter>& inner_outer_pairs,
348  const Executor* executor,
349  const std::vector<InnerOuterStringOpInfos>& inner_outer_string_op_infos_pairs = {});
350 
351  static std::vector<const StringDictionaryProxy::IdMap*>
353  const CompositeKeyInfo& composite_key_info,
354  const std::vector<InnerOuterStringOpInfos>& string_op_infos_for_keys,
355  const Executor* executor);
356 
357  static std::pair<const StringDictionaryProxy*, StringDictionaryProxy*>
358  getStrDictProxies(const InnerOuter& cols,
359  const Executor* executor,
360  const bool has_string_ops);
361 
363  const InnerOuter& cols,
364  const InnerOuterStringOpInfos& inner_outer_string_op_infos,
365  ExpressionRange& old_col_range,
366  const Executor* executor);
367 
368  protected:
369  static llvm::Value* codegenColOrStringOper(
370  const Analyzer::Expr* col_or_string_oper,
371  const std::vector<StringOps_Namespace::StringOpInfo>& string_op_infos,
372  CodeGenerator& code_generator,
373  const CompilationOptions& co);
374 
375  virtual size_t getComponentBufferSize() const noexcept = 0;
376 
377  std::vector<std::shared_ptr<HashTable>> hash_tables_for_device_;
378 };
379 
380 std::ostream& operator<<(std::ostream& os, const DecodedJoinHashBufferEntry& e);
381 
382 std::ostream& operator<<(std::ostream& os, const DecodedJoinHashBufferSet& s);
383 
384 std::ostream& operator<<(std::ostream& os,
385  const InnerOuterStringOpInfos& inner_outer_string_op_infos);
386 std::ostream& operator<<(
387  std::ostream& os,
388  const std::vector<InnerOuterStringOpInfos>& inner_outer_string_op_infos_pairs);
389 
390 std::string toString(const InnerOuterStringOpInfos& inner_outer_string_op_infos);
391 
392 std::string toString(
393  const std::vector<InnerOuterStringOpInfos>& inner_outer_string_op_infos_pairs);
394 
395 std::shared_ptr<Analyzer::ColumnVar> getSyntheticColumnVar(
396  std::string_view table,
397  std::string_view column,
398  int rte_idx,
399  const Catalog_Namespace::Catalog& catalog);
400 
401 size_t get_shard_count(const Analyzer::BinOper* join_condition, const Executor* executor);
402 
403 size_t get_shard_count(
404  std::pair<const Analyzer::ColumnVar*, const Analyzer::Expr*> equi_pair,
405  const Executor* executor);
static std::vector< int > collectFragmentIds(const std::vector< Fragmenter_Namespace::FragmentInfo > &fragments)
Definition: HashJoin.cpp:461
static std::shared_ptr< HashJoin > getSyntheticInstance(std::string_view table1, std::string_view column1, const Catalog_Namespace::Catalog &catalog1, std::string_view table2, std::string_view column2, const Catalog_Namespace::Catalog &catalog2, const Data_Namespace::MemoryLevel memory_level, const HashType preferred_hash_type, const int device_count, ColumnCacheMap &column_cache, Executor *executor)
Make hash table from named tables and columns (such as for testing).
Definition: HashJoin.cpp:690
Defines data structures for the semantic analysis phase of query processing.
virtual int getInnerTableRteIdx() const noexcept=0
virtual size_t payloadBufferOff() const noexcept=0
virtual std::string getHashJoinType() const =0
virtual HashJoinMatchingSet codegenMatchingSet(const CompilationOptions &, const size_t)=0
JoinType
Definition: sqldefs.h:174
static llvm::Value * codegenHashTableLoad(const size_t table_idx, Executor *executor)
Definition: HashJoin.cpp:259
std::pair< const Analyzer::ColumnVar *, const Analyzer::Expr * > InnerOuter
Definition: HashJoin.h:105
static bool canAccessHashTable(bool allow_hash_table_recycling, bool invalid_cache_key, JoinType join_type)
Definition: HashJoin.cpp:1049
virtual HashType getHashType() const noexcept=0
std::vector< ChunkKey > cache_key_chunks
Definition: HashJoin.h:129
std::vector< const void * > sd_inner_proxy_per_key
Definition: HashJoin.h:127
virtual int getDeviceCount() const noexcept=0
virtual std::string toStringFlat64(const ExecutorDeviceType device_type, const int device_id) const
Definition: HashJoin.cpp:118
static void checkHashJoinReplicationConstraint(const shared::TableKey &table_key, const size_t shard_count, const Executor *executor)
Definition: HashJoin.cpp:796
std::ostream & operator<<(std::ostream &os, const SessionInfo &session_info)
Definition: SessionInfo.cpp:57
void setBucketInfo(const std::vector< double > &bucket_sizes_for_dimension, const std::vector< InnerOuter > inner_outer_pairs)
Definition: HashJoin.cpp:37
JoinColumn fetchJoinColumn(const Analyzer::ColumnVar *hash_col, const std::vector< Fragmenter_Namespace::FragmentInfo > &fragment_info, const Data_Namespace::MemoryLevel effective_memory_level, const int device_id, std::vector< std::shared_ptr< Chunk_NS::Chunk >> &chunks_owner, DeviceAllocator *dev_buff_owner, std::vector< std::shared_ptr< void >> &malloc_owner, Executor *executor, ColumnCacheMap *column_cache)
Definition: HashJoin.cpp:60
llvm::Value * elements
Definition: HashJoin.h:121
llvm::Value * count
Definition: HashJoin.h:122
virtual Data_Namespace::MemoryLevel getMemoryLevel() const noexcept=0
std::vector< std::shared_ptr< HashTable > > hash_tables_for_device_
Definition: HashJoin.h:377
static std::pair< const StringDictionaryProxy *, StringDictionaryProxy * > getStrDictProxies(const InnerOuter &cols, const Executor *executor, const bool has_string_ops)
Definition: HashJoin.cpp:394
Definition: HashTable.h:21
virtual llvm::Value * codegenSlot(const CompilationOptions &, const size_t)=0
TableMustBeReplicated(const std::string &table_name)
Definition: HashJoin.h:56
std::string toString(const QueryDescriptionType &type)
Definition: Types.h:64
static llvm::Value * codegenColOrStringOper(const Analyzer::Expr *col_or_string_oper, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos, CodeGenerator &code_generator, const CompilationOptions &co)
Definition: HashJoin.cpp:564
void freeHashBufferMemory()
Definition: HashJoin.h:337
virtual size_t offsetBufferOff() const noexcept=0
ExecutorDeviceType
virtual std::string toStringFlat32(const ExecutorDeviceType device_type, const int device_id) const
Definition: HashJoin.cpp:123
std::string to_string(char const *&&v)
virtual size_t countBufferOff() const noexcept=0
std::unordered_map< int, const ResultSetPtr & > TemporaryTables
Definition: InputMetadata.h:31
const std::vector< JoinColumnTypeInfo > join_column_types
Definition: HashJoin.h:111
std::unordered_map< size_t, HashTableBuildDag > HashTableBuildDagMap
std::vector< void * > sd_outer_proxy_per_key
Definition: HashJoin.h:128
HashJoinFail(const std::string &err_msg, InnerQualDecision qual_decision)
Definition: HashJoin.h:74
static size_t getMaximumNumHashEntriesCanHold(MemoryLevel memory_level, const Executor *executor, size_t rowid_size) noexcept
Definition: HashJoin.cpp:1056
static std::string generateTooManyHashEntriesErrMsg(size_t num_entries, size_t threshold, MemoryLevel memory_level)
Definition: HashJoin.h:165
static constexpr size_t MAX_NUM_HASH_ENTRIES
Definition: HashJoin.h:136
int8_t * getJoinHashBuffer(const ExecutorDeviceType device_type, const int device_id) const
Definition: HashJoin.h:314
static std::vector< const StringDictionaryProxy::IdMap * > translateCompositeStrDictProxies(const CompositeKeyInfo &composite_key_info, const std::vector< InnerOuterStringOpInfos > &string_op_infos_for_keys, const Executor *executor)
Definition: HashJoin.cpp:528
JoinHashTableTooBig(size_t cur_hash_table_size, size_t threshold_size)
Definition: HashJoin.h:40
size_t getJoinHashBufferSize(const ExecutorDeviceType device_type, const int device_id) const
Definition: HashJoin.h:305
virtual size_t getComponentBufferSize() const noexcept=0
const std::vector< std::shared_ptr< Chunk_NS::Chunk > > chunks_owner
Definition: HashJoin.h:112
static const StringDictionaryProxy::IdMap * translateInnerToOuterStrDictProxies(const InnerOuter &cols, const InnerOuterStringOpInfos &inner_outer_string_op_infos, ExpressionRange &old_col_range, const Executor *executor)
Definition: HashJoin.cpp:423
HashTable * getHashTableForDevice(const size_t device_id) const
Definition: HashJoin.h:295
virtual shared::TableKey getInnerTableId() const noexcept=0
std::unordered_map< shared::TableKey, const RelAlgNode * > TableIdToNodeMap
#define CHECK_LT(x, y)
Definition: Logger.h:303
TooManyHashEntries(const std::string &reason)
Definition: HashJoin.h:51
static std::string getHashTypeString(HashType ht) noexcept
Definition: HashJoin.h:179
size_t getJoinHashBufferSize(const ExecutorDeviceType device_type)
Definition: HashJoin.h:300
std::set< DecodedJoinHashBufferEntry > DecodedJoinHashBufferSet
Definition: HashTable.h:72
std::unordered_map< shared::TableKey, std::unordered_map< int, std::shared_ptr< const ColumnarResults >>> ColumnCacheMap
HashJoinFail(const std::string &err_msg)
Definition: HashJoin.h:72
std::shared_ptr< Analyzer::ColumnVar > getSyntheticColumnVar(std::string_view table, std::string_view column, int rte_idx, const Catalog_Namespace::Catalog &catalog)
Definition: HashJoin.cpp:580
TooBigHashTableForBoundingBoxIntersect(const size_t bbox_intersect_hash_table_max_bytes)
Definition: HashJoin.h:98
#define CHECK(condition)
Definition: Logger.h:291
std::pair< std::vector< StringOps_Namespace::StringOpInfo >, std::vector< StringOps_Namespace::StringOpInfo >> InnerOuterStringOpInfos
Definition: HashJoin.h:107
llvm::Value * slot
Definition: HashJoin.h:123
static std::pair< InnerOuter, InnerOuterStringOpInfos > normalizeColumnPair(const Analyzer::Expr *lhs, const Analyzer::Expr *rhs, const TemporaryTables *temporary_tables, const bool is_bbox_intersect=false)
Definition: HashJoin.cpp:822
static const T * getHashJoinColumn(const Analyzer::Expr *expr)
Definition: HashJoin.cpp:813
static std::pair< std::vector< InnerOuter >, std::vector< InnerOuterStringOpInfos > > normalizeColumnPairs(const Analyzer::BinOper *condition, const TemporaryTables *temporary_tables)
Definition: HashJoin.cpp:1015
FileBuffer Chunk
A Chunk is the fundamental unit of execution in Map-D.
Definition: FileMgr.h:80
const std::vector< std::shared_ptr< void > > malloc_owner
Definition: HashJoin.h:114
InnerQualDecision
Definition: HashJoin.h:61
virtual DecodedJoinHashBufferSet toSet(const ExecutorDeviceType device_type, const int device_id) const =0
std::vector< JoinBucketInfo > join_buckets
Definition: HashJoin.h:113
size_t get_shard_count(const Analyzer::BinOper *join_condition, const Executor *executor)
Definition: HashJoin.cpp:1084
static std::shared_ptr< HashJoin > getInstance(const std::shared_ptr< Analyzer::BinOper > qual_bin_oper, const std::vector< InputTableInfo > &query_infos, const Data_Namespace::MemoryLevel memory_level, const JoinType join_type, const HashType preferred_hash_type, const int device_count, ColumnCacheMap &column_cache, Executor *executor, const HashTableBuildDagMap &hashtable_build_dag_map, const RegisteredQueryHint &query_hint, const TableIdToNodeMap &table_id_to_node_map)
Make hash table from an in-flight SQL query&#39;s parse tree etc.
Definition: HashJoin.cpp:285
virtual std::string toString(const ExecutorDeviceType device_type, const int device_id=0, bool raw=false) const =0
HashType
Definition: HashTable.h:19
InnerQualDecision inner_qual_decision
Definition: HashJoin.h:77
const std::vector< JoinColumn > join_columns
Definition: HashJoin.h:110
static bool layoutRequiresAdditionalBuffers(HashType layout) noexcept
Definition: HashJoin.h:175
virtual bool isBitwiseEq() const =0
static CompositeKeyInfo getCompositeKeyInfo(const std::vector< InnerOuter > &inner_outer_pairs, const Executor *executor, const std::vector< InnerOuterStringOpInfos > &inner_outer_string_op_infos_pairs={})
Definition: HashJoin.cpp:470