OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HashJoin Class Referenceabstract

#include <HashJoin.h>

+ Inheritance diagram for HashJoin:

Public Member Functions

virtual std::string toString (const ExecutorDeviceType device_type, const int device_id=0, bool raw=false) const =0
 
virtual std::string toStringFlat64 (const ExecutorDeviceType device_type, const int device_id) const
 
virtual std::string toStringFlat32 (const ExecutorDeviceType device_type, const int device_id) const
 
virtual DecodedJoinHashBufferSet toSet (const ExecutorDeviceType device_type, const int device_id) const =0
 
virtual llvm::Value * codegenSlot (const CompilationOptions &, const size_t)=0
 
virtual HashJoinMatchingSet codegenMatchingSet (const CompilationOptions &, const size_t)=0
 
virtual int getInnerTableId () const noexcept=0
 
virtual int getInnerTableRteIdx () const noexcept=0
 
virtual HashType getHashType () const noexcept=0
 
virtual Data_Namespace::MemoryLevel getMemoryLevel () const noexcept=0
 
virtual int getDeviceCount () const noexcept=0
 
virtual size_t offsetBufferOff () const noexcept=0
 
virtual size_t countBufferOff () const noexcept=0
 
virtual size_t payloadBufferOff () const noexcept=0
 
virtual std::string getHashJoinType () const =0
 
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)
 
HashTablegetHashTableForDevice (const size_t device_id) const
 
size_t getJoinHashBufferSize (const ExecutorDeviceType device_type)
 
size_t getJoinHashBufferSize (const ExecutorDeviceType device_type, const int device_id) const
 
int8_t * getJoinHashBuffer (const ExecutorDeviceType device_type, const int device_id) const
 
void freeHashBufferMemory ()
 

Static Public Member Functions

static bool layoutRequiresAdditionalBuffers (HashType layout) noexcept
 
static std::string getHashTypeString (HashType ht) noexcept
 
static HashJoinMatchingSet codegenMatchingSet (const std::vector< llvm::Value * > &hash_join_idx_args_in, const bool is_sharded, const bool col_is_nullable, const bool is_bw_eq, const int64_t sub_buff_size, Executor *executor, const bool is_bucketized=false)
 
static llvm::Value * codegenHashTableLoad (const size_t table_idx, Executor *executor)
 
static std::shared_ptr< HashJoingetInstance (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's parse tree etc. More...
 
static std::shared_ptr< HashJoingetSyntheticInstance (std::string_view table1, std::string_view column1, std::string_view table2, std::string_view column2, 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). More...
 
static std::shared_ptr< HashJoingetSyntheticInstance (const std::shared_ptr< Analyzer::BinOper > qual_bin_oper, 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). More...
 
static std::pair< std::string,
std::shared_ptr< HashJoin > > 
getSyntheticInstance (std::vector< std::shared_ptr< Analyzer::BinOper >>, const Data_Namespace::MemoryLevel memory_level, const HashType preferred_hash_type, const int device_count, ColumnCacheMap &column_cache, Executor *executor)
 
static int getInnerTableId (const std::vector< InnerOuter > &inner_outer_pairs)
 
static void checkHashJoinReplicationConstraint (const int table_id, const size_t shard_count, const Executor *executor)
 
static InnerOuter normalizeColumnPair (const Analyzer::Expr *lhs, const Analyzer::Expr *rhs, const Catalog_Namespace::Catalog &cat, const TemporaryTables *temporary_tables, const bool is_overlaps_join=false)
 
static std::vector< InnerOuternormalizeColumnPairs (const Analyzer::BinOper *condition, const Catalog_Namespace::Catalog &cat, const TemporaryTables *temporary_tables)
 
static CompositeKeyInfo getCompositeKeyInfo (const std::vector< InnerOuter > &inner_outer_pairs, const Executor *executor)
 

Protected Member Functions

virtual size_t getComponentBufferSize () const noexcept=0
 

Protected Attributes

std::vector< std::shared_ptr
< HashTable > > 
hash_tables_for_device_
 

Detailed Description

Definition at line 104 of file HashJoin.h.

Member Function Documentation

void HashJoin::checkHashJoinReplicationConstraint ( const int  table_id,
const size_t  shard_count,
const Executor executor 
)
static

Definition at line 587 of file HashJoin.cpp.

References CHECK, g_cluster, and table_is_replicated().

Referenced by RangeJoinHashTable::getInstance(), BaselineJoinHashTable::reify(), and PerfectJoinHashTable::reify().

589  {
590  if (!g_cluster) {
591  return;
592  }
593  if (table_id >= 0) {
594  CHECK(executor);
595  const auto inner_td = executor->getCatalog()->getMetadataForTable(table_id);
596  CHECK(inner_td);
597  if (!shard_count && !table_is_replicated(inner_td)) {
598  throw TableMustBeReplicated(inner_td->tableName);
599  }
600  }
601 }
bool table_is_replicated(const TableDescriptor *td)
#define CHECK(condition)
Definition: Logger.h:209
bool g_cluster

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

llvm::Value * HashJoin::codegenHashTableLoad ( const size_t  table_idx,
Executor executor 
)
static

Definition at line 215 of file HashJoin.cpp.

References AUTOMATIC_IR_METADATA, CHECK, CHECK_LT, and get_arg_by_name().

Referenced by PerfectJoinHashTable::codegenHashTableLoad(), BaselineJoinHashTable::codegenMatchingSet(), OverlapsJoinHashTable::codegenMatchingSet(), RangeJoinHashTable::codegenMatchingSetWithOffset(), and BaselineJoinHashTable::hashPtr().

215  {
216  AUTOMATIC_IR_METADATA(executor->cgen_state_.get());
217  llvm::Value* hash_ptr = nullptr;
218  const auto total_table_count =
219  executor->plan_state_->join_info_.join_hash_tables_.size();
220  CHECK_LT(table_idx, total_table_count);
221  if (total_table_count > 1) {
222  auto hash_tables_ptr =
223  get_arg_by_name(executor->cgen_state_->row_func_, "join_hash_tables");
224  auto hash_pptr =
225  table_idx > 0 ? executor->cgen_state_->ir_builder_.CreateGEP(
226  hash_tables_ptr,
227  executor->cgen_state_->llInt(static_cast<int64_t>(table_idx)))
228  : hash_tables_ptr;
229  hash_ptr = executor->cgen_state_->ir_builder_.CreateLoad(hash_pptr);
230  } else {
231  hash_ptr = get_arg_by_name(executor->cgen_state_->row_func_, "join_hash_tables");
232  }
233  CHECK(hash_ptr);
234  return hash_ptr;
235 }
llvm::Value * get_arg_by_name(llvm::Function *func, const std::string &name)
Definition: Execute.h:164
#define AUTOMATIC_IR_METADATA(CGENSTATE)
#define CHECK_LT(x, y)
Definition: Logger.h:219
#define CHECK(condition)
Definition: Logger.h:209

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual HashJoinMatchingSet HashJoin::codegenMatchingSet ( const CompilationOptions ,
const size_t   
)
pure virtual

Implemented in OverlapsJoinHashTable, BaselineJoinHashTable, and PerfectJoinHashTable.

Referenced by PerfectJoinHashTable::codegenMatchingSet(), BaselineJoinHashTable::codegenMatchingSet(), OverlapsJoinHashTable::codegenMatchingSet(), and RangeJoinHashTable::codegenMatchingSetWithOffset().

+ Here is the caller graph for this function:

HashJoinMatchingSet HashJoin::codegenMatchingSet ( const std::vector< llvm::Value * > &  hash_join_idx_args_in,
const bool  is_sharded,
const bool  col_is_nullable,
const bool  is_bw_eq,
const int64_t  sub_buff_size,
Executor executor,
const bool  is_bucketized = false 
)
static

Definition at line 166 of file HashJoin.cpp.

References AUTOMATIC_IR_METADATA, and CHECK.

173  {
174  AUTOMATIC_IR_METADATA(executor->cgen_state_.get());
175  using namespace std::string_literals;
176 
177  std::string fname(is_bucketized ? "bucketized_hash_join_idx"s : "hash_join_idx"s);
178 
179  if (is_bw_eq) {
180  fname += "_bitwise";
181  }
182  if (is_sharded) {
183  fname += "_sharded";
184  }
185  if (!is_bw_eq && col_is_nullable) {
186  fname += "_nullable";
187  }
188 
189  const auto slot_lv = executor->cgen_state_->emitCall(fname, hash_join_idx_args_in);
190  const auto slot_valid_lv = executor->cgen_state_->ir_builder_.CreateICmpSGE(
191  slot_lv, executor->cgen_state_->llInt(int64_t(0)));
192 
193  auto pos_ptr = hash_join_idx_args_in[0];
194  CHECK(pos_ptr);
195 
196  auto count_ptr = executor->cgen_state_->ir_builder_.CreateAdd(
197  pos_ptr, executor->cgen_state_->llInt(sub_buff_size));
198  auto hash_join_idx_args = hash_join_idx_args_in;
199  hash_join_idx_args[0] = executor->cgen_state_->ir_builder_.CreatePtrToInt(
200  count_ptr, llvm::Type::getInt64Ty(executor->cgen_state_->context_));
201 
202  const auto row_count_lv = executor->cgen_state_->ir_builder_.CreateSelect(
203  slot_valid_lv,
204  executor->cgen_state_->emitCall(fname, hash_join_idx_args),
205  executor->cgen_state_->llInt(int64_t(0)));
206  auto rowid_base_i32 = executor->cgen_state_->ir_builder_.CreateIntToPtr(
207  executor->cgen_state_->ir_builder_.CreateAdd(
208  pos_ptr, executor->cgen_state_->llInt(2 * sub_buff_size)),
209  llvm::Type::getInt32PtrTy(executor->cgen_state_->context_));
210  auto rowid_ptr_i32 =
211  executor->cgen_state_->ir_builder_.CreateGEP(rowid_base_i32, slot_lv);
212  return {rowid_ptr_i32, row_count_lv, slot_lv};
213 }
#define AUTOMATIC_IR_METADATA(CGENSTATE)
#define CHECK(condition)
Definition: Logger.h:209
virtual llvm::Value* HashJoin::codegenSlot ( const CompilationOptions ,
const size_t   
)
pure virtual
virtual size_t HashJoin::countBufferOff ( ) const
pure virtualnoexcept
JoinColumn HashJoin::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 
)

fetchJoinColumn() calls ColumnFetcher::makeJoinColumn(), then copies the JoinColumn's col_chunks_buff memory onto the GPU if required by the effective_memory_level parameter. The dev_buff_owner parameter will manage the GPU memory.

Definition at line 54 of file HashJoin.cpp.

References Allocator::alloc(), CHECK, JoinColumn::col_chunks_buff, JoinColumn::col_chunks_buff_sz, DeviceAllocator::copyToDevice(), Data_Namespace::GPU_LEVEL, and ColumnFetcher::makeJoinColumn().

Referenced by OverlapsJoinHashTable::fetchColumnsForDevice(), PerfectJoinHashTable::fetchColumnsForDevice(), and BaselineJoinHashTable::fetchColumnsForDevice().

63  {
64  static std::mutex fragment_fetch_mutex;
65  std::lock_guard<std::mutex> fragment_fetch_lock(fragment_fetch_mutex);
66  try {
67  JoinColumn join_column = ColumnFetcher::makeJoinColumn(executor,
68  *hash_col,
69  fragment_info,
70  effective_memory_level,
71  device_id,
72  dev_buff_owner,
73  /*thread_idx=*/0,
74  chunks_owner,
75  malloc_owner,
76  *column_cache);
77  if (effective_memory_level == Data_Namespace::GPU_LEVEL) {
78  CHECK(dev_buff_owner);
79  auto device_col_chunks_buff = dev_buff_owner->alloc(join_column.col_chunks_buff_sz);
80  dev_buff_owner->copyToDevice(device_col_chunks_buff,
81  join_column.col_chunks_buff,
82  join_column.col_chunks_buff_sz);
83  join_column.col_chunks_buff = device_col_chunks_buff;
84  }
85  return join_column;
86  } catch (...) {
87  throw FailedToFetchColumn();
88  }
89 }
static JoinColumn makeJoinColumn(Executor *executor, const Analyzer::ColumnVar &hash_col, const std::vector< Fragmenter_Namespace::FragmentInfo > &fragments, const Data_Namespace::MemoryLevel effective_mem_lvl, const int device_id, DeviceAllocator *device_allocator, const size_t thread_idx, std::vector< std::shared_ptr< Chunk_NS::Chunk >> &chunks_owner, std::vector< std::shared_ptr< void >> &malloc_owner, ColumnCacheMap &column_cache)
Creates a JoinColumn struct containing an array of JoinChunk structs.
virtual int8_t * alloc(const size_t num_bytes)=0
virtual void copyToDevice(void *device_dst, const void *host_src, const size_t num_bytes) const =0
size_t col_chunks_buff_sz
const int8_t * col_chunks_buff
#define CHECK(condition)
Definition: Logger.h:209

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void HashJoin::freeHashBufferMemory ( )
inline

Definition at line 281 of file HashJoin.h.

References hash_tables_for_device_.

Referenced by BaselineJoinHashTable::reify(), and PerfectJoinHashTable::reify().

281  {
282  auto empty_hash_tables =
284  hash_tables_for_device_.swap(empty_hash_tables);
285  }
std::vector< std::shared_ptr< HashTable > > hash_tables_for_device_
Definition: HashJoin.h:294

+ Here is the caller graph for this function:

virtual size_t HashJoin::getComponentBufferSize ( ) const
protectedpure virtualnoexcept
CompositeKeyInfo HashJoin::getCompositeKeyInfo ( const std::vector< InnerOuter > &  inner_outer_pairs,
const Executor executor 
)
static

Definition at line 334 of file HashJoin.cpp.

References CHECK, and kENCODING_DICT.

Referenced by RangeJoinHashTable::approximateTupleCount(), BaselineJoinHashTable::approximateTupleCount(), BaselineJoinHashTable::initHashTableForDevice(), RangeJoinHashTable::initHashTableOnCpu(), OverlapsJoinHashTable::reify(), and BaselineJoinHashTable::reify().

336  {
337  CHECK(executor);
338  std::vector<const void*> sd_inner_proxy_per_key;
339  std::vector<const void*> sd_outer_proxy_per_key;
340  std::vector<ChunkKey> cache_key_chunks; // used for the cache key
341  const auto db_id = executor->getCatalog()->getCurrentDB().dbId;
342  for (const auto& inner_outer_pair : inner_outer_pairs) {
343  const auto inner_col = inner_outer_pair.first;
344  const auto outer_col = inner_outer_pair.second;
345  const auto& inner_ti = inner_col->get_type_info();
346  const auto& outer_ti = outer_col->get_type_info();
347  ChunkKey cache_key_chunks_for_column{
348  db_id, inner_col->get_table_id(), inner_col->get_column_id()};
349  if (inner_ti.is_string() &&
350  !(inner_ti.get_comp_param() == outer_ti.get_comp_param())) {
351  CHECK(outer_ti.is_string());
352  CHECK(inner_ti.get_compression() == kENCODING_DICT &&
353  outer_ti.get_compression() == kENCODING_DICT);
354  const auto sd_inner_proxy = executor->getStringDictionaryProxy(
355  inner_ti.get_comp_param(), executor->getRowSetMemoryOwner(), true);
356  const auto sd_outer_proxy = executor->getStringDictionaryProxy(
357  outer_ti.get_comp_param(), executor->getRowSetMemoryOwner(), true);
358  CHECK(sd_inner_proxy && sd_outer_proxy);
359  sd_inner_proxy_per_key.push_back(sd_inner_proxy);
360  sd_outer_proxy_per_key.push_back(sd_outer_proxy);
361  cache_key_chunks_for_column.push_back(sd_outer_proxy->getGeneration());
362  } else {
363  sd_inner_proxy_per_key.emplace_back();
364  sd_outer_proxy_per_key.emplace_back();
365  }
366  cache_key_chunks.push_back(cache_key_chunks_for_column);
367  }
368  return {sd_inner_proxy_per_key, sd_outer_proxy_per_key, cache_key_chunks};
369 }
std::vector< int > ChunkKey
Definition: types.h:37
#define CHECK(condition)
Definition: Logger.h:209

+ Here is the caller graph for this function:

virtual int HashJoin::getDeviceCount ( ) const
pure virtualnoexcept
virtual std::string HashJoin::getHashJoinType ( ) const
pure virtual
HashTable* HashJoin::getHashTableForDevice ( const size_t  device_id) const
inline

Definition at line 239 of file HashJoin.h.

References CHECK_LT, and hash_tables_for_device_.

Referenced by OverlapsJoinHashTable::codegenManyKey(), BaselineJoinHashTable::codegenMatchingSet(), BaselineJoinHashTable::codegenSlot(), BaselineJoinHashTable::getComponentBufferSize(), OverlapsJoinHashTable::getEmittedKeysCount(), OverlapsJoinHashTable::getEntryCount(), BaselineJoinHashTable::getHashType(), OverlapsJoinHashTable::getHashType(), getJoinHashBufferSize(), BaselineJoinHashTable::getKeyBufferSize(), BaselineJoinHashTable::toSet(), and OverlapsJoinHashTable::toSet().

239  {
240  CHECK_LT(device_id, hash_tables_for_device_.size());
241  return hash_tables_for_device_[device_id].get();
242  }
std::vector< std::shared_ptr< HashTable > > hash_tables_for_device_
Definition: HashJoin.h:294
#define CHECK_LT(x, y)
Definition: Logger.h:219

+ Here is the caller graph for this function:

virtual HashType HashJoin::getHashType ( ) const
pure virtualnoexcept
static std::string HashJoin::getHashTypeString ( HashType  ht)
inlinestaticnoexcept

Definition at line 134 of file HashJoin.h.

Referenced by BaselineJoinHashTableBuilder::allocateDeviceMemory(), BaselineJoinHashTable::getInstance(), PerfectJoinHashTable::getInstance(), OverlapsJoinHashTable::getInstance(), PerfectJoinHashTable::initHashTableForDevice(), BaselineJoinHashTable::initHashTableForDevice(), HashingSchemeRecycler::putItemToCache(), RangeJoinHashTable::reifyWithLayout(), OverlapsJoinHashTable::reifyWithLayout(), HashingSchemeRecycler::toString(), PerfectJoinHashTable::toString(), BaselineJoinHashTable::toString(), and OverlapsJoinHashTable::toString().

134  {
135  const char* HashTypeStrings[3] = {"OneToOne", "OneToMany", "ManyToMany"};
136  return HashTypeStrings[static_cast<int>(ht)];
137  };

+ Here is the caller graph for this function:

virtual int HashJoin::getInnerTableId ( ) const
pure virtualnoexcept

Implemented in OverlapsJoinHashTable, BaselineJoinHashTable, and PerfectJoinHashTable.

Referenced by OverlapsJoinHashTable::getInnerTableId(), RangeJoinHashTable::getInstance(), OverlapsJoinHashTable::getInstance(), RangeJoinHashTable::reifyWithLayout(), and OverlapsJoinHashTable::reifyWithLayout().

+ Here is the caller graph for this function:

static int HashJoin::getInnerTableId ( const std::vector< InnerOuter > &  inner_outer_pairs)
inlinestatic

Definition at line 216 of file HashJoin.h.

References CHECK.

216  {
217  CHECK(!inner_outer_pairs.empty());
218  const auto first_inner_col = inner_outer_pairs.front().first;
219  return first_inner_col->get_table_id();
220  }
#define CHECK(condition)
Definition: Logger.h:209
virtual int HashJoin::getInnerTableRteIdx ( ) const
pure virtualnoexcept
std::shared_ptr< HashJoin > 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 
)
static

Make hash table from an in-flight SQL query's parse tree etc.

Definition at line 238 of file HashJoin.cpp.

References CHECK, CHECK_EQ, CHECK_GT, coalesce_singleton_equi_join(), CPU, DEBUG_TIMER, g_enable_overlaps_hashjoin, BaselineJoinHashTable::getInstance(), PerfectJoinHashTable::getInstance(), OverlapsJoinHashTable::getInstance(), GPU, Data_Namespace::GPU_LEVEL, VLOG, and VLOGGING.

Referenced by Executor::buildHashTableForQualifier(), and getSyntheticInstance().

249  {
250  auto timer = DEBUG_TIMER(__func__);
251  std::shared_ptr<HashJoin> join_hash_table;
252  CHECK_GT(device_count, 0);
253  if (!g_enable_overlaps_hashjoin && qual_bin_oper->is_overlaps_oper()) {
254  throw std::runtime_error(
255  "Overlaps hash join disabled, attempting to fall back to loop join");
256  }
257  if (qual_bin_oper->is_overlaps_oper()) {
258  VLOG(1) << "Trying to build geo hash table:";
259  join_hash_table = OverlapsJoinHashTable::getInstance(qual_bin_oper,
260  query_infos,
261  memory_level,
262  join_type,
263  device_count,
264  column_cache,
265  executor,
266  hashtable_build_dag_map,
267  query_hint,
268  table_id_to_node_map);
269  } else if (dynamic_cast<const Analyzer::ExpressionTuple*>(
270  qual_bin_oper->get_left_operand())) {
271  VLOG(1) << "Trying to build keyed hash table:";
272  join_hash_table = BaselineJoinHashTable::getInstance(qual_bin_oper,
273  query_infos,
274  memory_level,
275  join_type,
276  preferred_hash_type,
277  device_count,
278  column_cache,
279  executor,
280  hashtable_build_dag_map,
281  table_id_to_node_map);
282  } else {
283  try {
284  VLOG(1) << "Trying to build perfect hash table:";
285  join_hash_table = PerfectJoinHashTable::getInstance(qual_bin_oper,
286  query_infos,
287  memory_level,
288  join_type,
289  preferred_hash_type,
290  device_count,
291  column_cache,
292  executor,
293  hashtable_build_dag_map,
294  table_id_to_node_map);
295  } catch (TooManyHashEntries&) {
296  const auto join_quals = coalesce_singleton_equi_join(qual_bin_oper);
297  CHECK_EQ(join_quals.size(), size_t(1));
298  const auto join_qual =
299  std::dynamic_pointer_cast<Analyzer::BinOper>(join_quals.front());
300  VLOG(1) << "Trying to build keyed hash table after perfect hash table:";
301  join_hash_table = BaselineJoinHashTable::getInstance(join_qual,
302  query_infos,
303  memory_level,
304  join_type,
305  preferred_hash_type,
306  device_count,
307  column_cache,
308  executor,
309  hashtable_build_dag_map,
310  table_id_to_node_map);
311  }
312  }
313  CHECK(join_hash_table);
314  if (VLOGGING(2)) {
315  if (join_hash_table->getMemoryLevel() == Data_Namespace::MemoryLevel::GPU_LEVEL) {
316  for (int device_id = 0; device_id < join_hash_table->getDeviceCount();
317  ++device_id) {
318  if (join_hash_table->getJoinHashBufferSize(ExecutorDeviceType::GPU, device_id) <=
319  1000) {
320  VLOG(2) << "Built GPU hash table: "
321  << join_hash_table->toString(ExecutorDeviceType::GPU, device_id);
322  }
323  }
324  } else {
325  if (join_hash_table->getJoinHashBufferSize(ExecutorDeviceType::CPU) <= 1000) {
326  VLOG(2) << "Built CPU hash table: "
327  << join_hash_table->toString(ExecutorDeviceType::CPU);
328  }
329  }
330  }
331  return join_hash_table;
332 }
#define CHECK_EQ(x, y)
Definition: Logger.h:217
std::list< std::shared_ptr< Analyzer::Expr > > coalesce_singleton_equi_join(const std::shared_ptr< Analyzer::BinOper > &join_qual)
static std::shared_ptr< OverlapsJoinHashTable > getInstance(const std::shared_ptr< Analyzer::BinOper > condition, const std::vector< InputTableInfo > &query_infos, const Data_Namespace::MemoryLevel memory_level, const JoinType join_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.
#define CHECK_GT(x, y)
Definition: Logger.h:221
bool g_enable_overlaps_hashjoin
Definition: Execute.cpp:98
static std::shared_ptr< BaselineJoinHashTable > getInstance(const std::shared_ptr< Analyzer::BinOper > condition, 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 TableIdToNodeMap &table_id_to_node_map)
Make hash table from an in-flight SQL query&#39;s parse tree etc.
#define VLOGGING(n)
Definition: Logger.h:207
static std::shared_ptr< PerfectJoinHashTable > 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 TableIdToNodeMap &table_id_to_node_map)
Make hash table from an in-flight SQL query&#39;s parse tree etc.
#define CHECK(condition)
Definition: Logger.h:209
#define DEBUG_TIMER(name)
Definition: Logger.h:352
#define VLOG(n)
Definition: Logger.h:303

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int8_t* HashJoin::getJoinHashBuffer ( const ExecutorDeviceType  device_type,
const int  device_id 
) const
inline

Definition at line 258 of file HashJoin.h.

References CHECK, CHECK_LT, CPU, and hash_tables_for_device_.

Referenced by PerfectJoinHashTable::toSet(), BaselineJoinHashTable::toSet(), OverlapsJoinHashTable::toSet(), PerfectJoinHashTable::toString(), BaselineJoinHashTable::toString(), OverlapsJoinHashTable::toString(), and anonymous_namespace{HashJoin.cpp}::toStringFlat().

259  {
260  // TODO: just make device_id a size_t
261  CHECK_LT(size_t(device_id), hash_tables_for_device_.size());
262  if (!hash_tables_for_device_[device_id]) {
263  return nullptr;
264  }
265  CHECK(hash_tables_for_device_[device_id]);
266  auto hash_table = hash_tables_for_device_[device_id].get();
267 #ifdef HAVE_CUDA
268  if (device_type == ExecutorDeviceType::CPU) {
269  return hash_table->getCpuBuffer();
270  } else {
271  CHECK(hash_table);
272  const auto gpu_buff = hash_table->getGpuBuffer();
273  return gpu_buff;
274  }
275 #else
276  CHECK(device_type == ExecutorDeviceType::CPU);
277  return hash_table->getCpuBuffer();
278 #endif
279  }
std::vector< std::shared_ptr< HashTable > > hash_tables_for_device_
Definition: HashJoin.h:294
#define CHECK_LT(x, y)
Definition: Logger.h:219
#define CHECK(condition)
Definition: Logger.h:209

+ Here is the caller graph for this function:

size_t HashJoin::getJoinHashBufferSize ( const ExecutorDeviceType  device_type)
inline

Definition at line 244 of file HashJoin.h.

References CHECK, and CPU.

Referenced by PerfectJoinHashTable::toSet(), PerfectJoinHashTable::toString(), and anonymous_namespace{HashJoin.cpp}::toStringFlat().

244  {
245  CHECK(device_type == ExecutorDeviceType::CPU);
246  return getJoinHashBufferSize(device_type, 0);
247  }
size_t getJoinHashBufferSize(const ExecutorDeviceType device_type)
Definition: HashJoin.h:244
#define CHECK(condition)
Definition: Logger.h:209

+ Here is the caller graph for this function:

size_t HashJoin::getJoinHashBufferSize ( const ExecutorDeviceType  device_type,
const int  device_id 
) const
inline

Definition at line 249 of file HashJoin.h.

References getHashTableForDevice().

250  {
251  auto hash_table = getHashTableForDevice(device_id);
252  if (!hash_table) {
253  return 0;
254  }
255  return hash_table->getHashTableBufferSize(device_type);
256  }
HashTable * getHashTableForDevice(const size_t device_id) const
Definition: HashJoin.h:239

+ Here is the call graph for this function:

virtual Data_Namespace::MemoryLevel HashJoin::getMemoryLevel ( ) const
pure virtualnoexcept
std::shared_ptr< HashJoin > HashJoin::getSyntheticInstance ( std::string_view  table1,
std::string_view  column1,
std::string_view  table2,
std::string_view  column2,
const Data_Namespace::MemoryLevel  memory_level,
const HashType  preferred_hash_type,
const int  device_count,
ColumnCacheMap column_cache,
Executor executor 
)
static

Make hash table from named tables and columns (such as for testing).

Definition at line 483 of file HashJoin.cpp.

References RegisteredQueryHint::defaults(), getInstance(), getSyntheticColumnVar(), getSyntheticInputTableInfo(), INNER, kBOOLEAN, kEQ, kONE, setupSyntheticCaching(), and ScalarExprVisitor< T >::visit().

492  {
493  auto a1 = getSyntheticColumnVar(table1, column1, 0, executor);
494  auto a2 = getSyntheticColumnVar(table2, column2, 1, executor);
495 
496  auto qual_bin_oper = std::make_shared<Analyzer::BinOper>(kBOOLEAN, kEQ, kONE, a1, a2);
497 
498  std::set<const Analyzer::ColumnVar*> cvs =
499  AllColumnVarsVisitor().visit(qual_bin_oper.get());
500  auto query_infos = getSyntheticInputTableInfo(cvs, executor);
501  setupSyntheticCaching(cvs, executor);
503 
504  auto hash_table = HashJoin::getInstance(qual_bin_oper,
505  query_infos,
506  memory_level,
508  preferred_hash_type,
509  device_count,
510  column_cache,
511  executor,
512  {},
513  query_hint,
514  {});
515  return hash_table;
516 }
std::vector< InputTableInfo > getSyntheticInputTableInfo(std::set< const Analyzer::ColumnVar * > cvs, Executor *executor)
Definition: HashJoin.cpp:456
Definition: sqldefs.h:30
T visit(const Analyzer::Expr *expr) const
void setupSyntheticCaching(std::set< const Analyzer::ColumnVar * > cvs, Executor *executor)
Definition: HashJoin.cpp:442
static RegisteredQueryHint defaults()
Definition: QueryHint.h:187
Definition: sqldefs.h:69
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:238
std::shared_ptr< Analyzer::ColumnVar > getSyntheticColumnVar(std::string_view table, std::string_view column, int rte_idx, Executor *executor)
Definition: HashJoin.cpp:371

+ Here is the call graph for this function:

std::shared_ptr< HashJoin > HashJoin::getSyntheticInstance ( const std::shared_ptr< Analyzer::BinOper qual_bin_oper,
const Data_Namespace::MemoryLevel  memory_level,
const HashType  preferred_hash_type,
const int  device_count,
ColumnCacheMap column_cache,
Executor executor 
)
static

Make hash table from named tables and columns (such as for testing).

Definition at line 519 of file HashJoin.cpp.

References RegisteredQueryHint::defaults(), getInstance(), getSyntheticInputTableInfo(), INNER, setupSyntheticCaching(), and ScalarExprVisitor< T >::visit().

525  {
526  std::set<const Analyzer::ColumnVar*> cvs =
527  AllColumnVarsVisitor().visit(qual_bin_oper.get());
528  auto query_infos = getSyntheticInputTableInfo(cvs, executor);
529  setupSyntheticCaching(cvs, executor);
531 
532  auto hash_table = HashJoin::getInstance(qual_bin_oper,
533  query_infos,
534  memory_level,
536  preferred_hash_type,
537  device_count,
538  column_cache,
539  executor,
540  {},
541  query_hint,
542  {});
543  return hash_table;
544 }
std::vector< InputTableInfo > getSyntheticInputTableInfo(std::set< const Analyzer::ColumnVar * > cvs, Executor *executor)
Definition: HashJoin.cpp:456
T visit(const Analyzer::Expr *expr) const
void setupSyntheticCaching(std::set< const Analyzer::ColumnVar * > cvs, Executor *executor)
Definition: HashJoin.cpp:442
static RegisteredQueryHint defaults()
Definition: QueryHint.h:187
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:238

+ Here is the call graph for this function:

std::pair< std::string, std::shared_ptr< HashJoin > > HashJoin::getSyntheticInstance ( std::vector< std::shared_ptr< Analyzer::BinOper >>  qual_bin_opers,
const Data_Namespace::MemoryLevel  memory_level,
const HashType  preferred_hash_type,
const int  device_count,
ColumnCacheMap column_cache,
Executor executor 
)
static

Definition at line 546 of file HashJoin.cpp.

References RegisteredQueryHint::defaults(), getInstance(), getSyntheticInputTableInfo(), INNER, setupSyntheticCaching(), and ScalarExprVisitor< T >::visit().

552  {
553  std::set<const Analyzer::ColumnVar*> cvs;
554  for (auto& qual : qual_bin_opers) {
555  auto cv = AllColumnVarsVisitor().visit(qual.get());
556  cvs.insert(cv.begin(), cv.end());
557  }
558  auto query_infos = getSyntheticInputTableInfo(cvs, executor);
559  setupSyntheticCaching(cvs, executor);
561  std::shared_ptr<HashJoin> hash_table;
562  std::string error_msg;
563  for (auto& qual : qual_bin_opers) {
564  try {
565  auto candidate_hash_table = HashJoin::getInstance(qual,
566  query_infos,
567  memory_level,
569  preferred_hash_type,
570  device_count,
571  column_cache,
572  executor,
573  {},
574  query_hint,
575  {});
576  if (candidate_hash_table) {
577  hash_table = candidate_hash_table;
578  }
579  } catch (HashJoinFail& e) {
580  error_msg = e.what();
581  continue;
582  }
583  }
584  return std::make_pair(error_msg, hash_table);
585 }
std::vector< InputTableInfo > getSyntheticInputTableInfo(std::set< const Analyzer::ColumnVar * > cvs, Executor *executor)
Definition: HashJoin.cpp:456
T visit(const Analyzer::Expr *expr) const
void setupSyntheticCaching(std::set< const Analyzer::ColumnVar * > cvs, Executor *executor)
Definition: HashJoin.cpp:442
static RegisteredQueryHint defaults()
Definition: QueryHint.h:187
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:238

+ Here is the call graph for this function:

InnerOuter HashJoin::normalizeColumnPair ( const Analyzer::Expr lhs,
const Analyzer::Expr rhs,
const Catalog_Namespace::Catalog cat,
const TemporaryTables temporary_tables,
const bool  is_overlaps_join = false 
)
static

Definition at line 603 of file HashJoin.cpp.

References cat(), get_column_descriptor_maybe(), get_column_type(), Analyzer::Expr::get_type_info(), is_constructed_point(), kCAST, kENCODING_DICT, kPOINT, gpu_enabled::swap(), and ScalarExprVisitor< T >::visit().

Referenced by anonymous_namespace{PerfectJoinHashTable.cpp}::get_cols(), anonymous_namespace{HashJoin.cpp}::get_cols(), normalizeColumnPairs(), and QueryPlanDagExtractor::normalizeColumnsPair().

607  {
608  const auto& lhs_ti = lhs->get_type_info();
609  const auto& rhs_ti = rhs->get_type_info();
610  if (!is_overlaps_join) {
611  if (lhs_ti.get_type() != rhs_ti.get_type()) {
612  throw HashJoinFail("Equijoin types must be identical, found: " +
613  lhs_ti.get_type_name() + ", " + rhs_ti.get_type_name());
614  }
615  if (!lhs_ti.is_integer() && !lhs_ti.is_time() && !lhs_ti.is_string() &&
616  !lhs_ti.is_decimal()) {
617  throw HashJoinFail("Cannot apply hash join to inner column type " +
618  lhs_ti.get_type_name());
619  }
620  // Decimal types should be identical.
621  if (lhs_ti.is_decimal() && (lhs_ti.get_scale() != rhs_ti.get_scale() ||
622  lhs_ti.get_precision() != rhs_ti.get_precision())) {
623  throw HashJoinFail("Equijoin with different decimal types");
624  }
625  }
626 
627  const auto lhs_cast = dynamic_cast<const Analyzer::UOper*>(lhs);
628  const auto rhs_cast = dynamic_cast<const Analyzer::UOper*>(rhs);
629  if (lhs_ti.is_string() && (static_cast<bool>(lhs_cast) != static_cast<bool>(rhs_cast) ||
630  (lhs_cast && lhs_cast->get_optype() != kCAST) ||
631  (rhs_cast && rhs_cast->get_optype() != kCAST))) {
632  throw HashJoinFail("Cannot use hash join for given expression");
633  }
634  // Casts to decimal are not suported.
635  if (lhs_ti.is_decimal() && (lhs_cast || rhs_cast)) {
636  throw HashJoinFail("Cannot use hash join for given expression");
637  }
638  const auto lhs_col =
639  lhs_cast ? dynamic_cast<const Analyzer::ColumnVar*>(lhs_cast->get_operand())
640  : dynamic_cast<const Analyzer::ColumnVar*>(lhs);
641  const auto rhs_col =
642  rhs_cast ? dynamic_cast<const Analyzer::ColumnVar*>(rhs_cast->get_operand())
643  : dynamic_cast<const Analyzer::ColumnVar*>(rhs);
644  if (!lhs_col && !rhs_col) {
645  throw HashJoinFail("Cannot use hash join for given expression");
646  }
647  const Analyzer::ColumnVar* inner_col{nullptr};
648  const Analyzer::ColumnVar* outer_col{nullptr};
649  auto outer_ti = lhs_ti;
650  auto inner_ti = rhs_ti;
651  const Analyzer::Expr* outer_expr{lhs};
652  if (!lhs_col || (rhs_col && lhs_col->get_rte_idx() < rhs_col->get_rte_idx())) {
653  inner_col = rhs_col;
654  outer_col = lhs_col;
655  } else {
656  if (lhs_col && lhs_col->get_rte_idx() == 0) {
657  throw HashJoinFail("Cannot use hash join for given expression");
658  }
659  inner_col = lhs_col;
660  outer_col = rhs_col;
661  std::swap(outer_ti, inner_ti);
662  outer_expr = rhs;
663  }
664  if (!inner_col) {
665  throw HashJoinFail("Cannot use hash join for given expression");
666  }
667  if (!outer_col) {
668  // check whether outer_col is a constant, i.e., inner_col = K;
669  const auto outer_constant_col = dynamic_cast<const Analyzer::Constant*>(outer_expr);
670  if (outer_constant_col) {
671  throw HashJoinFail(
672  "Cannot use hash join for given expression: try to join with a constant "
673  "value");
674  }
675  MaxRangeTableIndexVisitor rte_idx_visitor;
676  int outer_rte_idx = rte_idx_visitor.visit(outer_expr);
677  // The inner column candidate is not actually inner; the outer
678  // expression contains columns which are at least as deep.
679  if (inner_col->get_rte_idx() <= outer_rte_idx) {
680  throw HashJoinFail("Cannot use hash join for given expression");
681  }
682  }
683  // We need to fetch the actual type information from the catalog since Analyzer
684  // always reports nullable as true for inner table columns in left joins.
685  const auto inner_col_cd = get_column_descriptor_maybe(
686  inner_col->get_column_id(), inner_col->get_table_id(), cat);
687  const auto inner_col_real_ti = get_column_type(inner_col->get_column_id(),
688  inner_col->get_table_id(),
689  inner_col_cd,
690  temporary_tables);
691  const auto& outer_col_ti =
692  !(dynamic_cast<const Analyzer::FunctionOper*>(lhs)) && outer_col
693  ? outer_col->get_type_info()
694  : outer_ti;
695  // Casts from decimal are not supported.
696  if ((inner_col_real_ti.is_decimal() || outer_col_ti.is_decimal()) &&
697  (lhs_cast || rhs_cast)) {
698  throw HashJoinFail("Cannot use hash join for given expression");
699  }
700  if (is_overlaps_join) {
701  if (!inner_col_real_ti.is_array()) {
702  throw HashJoinFail(
703  "Overlaps join only supported for inner columns with array type");
704  }
705  auto is_bounds_array = [](const auto ti) {
706  return ti.is_fixlen_array() && ti.get_size() == 32;
707  };
708  if (!is_bounds_array(inner_col_real_ti)) {
709  throw HashJoinFail(
710  "Overlaps join only supported for 4-element double fixed length arrays");
711  }
712  if (!(outer_col_ti.get_type() == kPOINT || is_bounds_array(outer_col_ti) ||
713  is_constructed_point(outer_expr))) {
714  throw HashJoinFail(
715  "Overlaps join only supported for geometry outer columns of type point, "
716  "geometry columns with bounds or constructed points");
717  }
718  } else {
719  if (!(inner_col_real_ti.is_integer() || inner_col_real_ti.is_time() ||
720  inner_col_real_ti.is_decimal() ||
721  (inner_col_real_ti.is_string() &&
722  inner_col_real_ti.get_compression() == kENCODING_DICT))) {
723  throw HashJoinFail(
724  "Can only apply hash join to integer-like types and dictionary encoded "
725  "strings");
726  }
727  }
728 
729  auto normalized_inner_col = inner_col;
730  auto normalized_outer_col = outer_col ? outer_col : outer_expr;
731 
732  const auto& normalized_inner_ti = normalized_inner_col->get_type_info();
733  const auto& normalized_outer_ti = normalized_outer_col->get_type_info();
734 
735  if (normalized_inner_ti.is_string() != normalized_outer_ti.is_string()) {
736  throw HashJoinFail(std::string("Could not build hash tables for incompatible types " +
737  normalized_inner_ti.get_type_name() + " and " +
738  normalized_outer_ti.get_type_name()));
739  }
740 
741  return {normalized_inner_col, normalized_outer_col};
742 }
std::string cat(Ts &&...args)
bool is_constructed_point(const Analyzer::Expr *expr)
Definition: Execute.h:1226
const SQLTypeInfo get_column_type(const int col_id, const int table_id, const ColumnDescriptor *cd, const TemporaryTables *temporary_tables)
Definition: Execute.h:234
Definition: sqldefs.h:49
T visit(const Analyzer::Expr *expr) const
const ColumnDescriptor * get_column_descriptor_maybe(const int col_id, const int table_id, const Catalog_Namespace::Catalog &cat)
Definition: Execute.h:218
const SQLTypeInfo & get_type_info() const
Definition: Analyzer.h:77
DEVICE void swap(ARGS &&...args)
Definition: gpu_enabled.h:114

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector< InnerOuter > HashJoin::normalizeColumnPairs ( const Analyzer::BinOper condition,
const Catalog_Namespace::Catalog cat,
const TemporaryTables temporary_tables 
)
static

Definition at line 744 of file HashJoin.cpp.

References cat(), CHECK, CHECK_EQ, Analyzer::BinOper::get_left_operand(), Analyzer::BinOper::get_right_operand(), i, Analyzer::BinOper::is_overlaps_oper(), normalizeColumnPair(), and run_benchmark_import::result.

Referenced by anonymous_namespace{FromTableReordering.cpp}::get_join_qual_cost(), BaselineJoinHashTable::getInstance(), OverlapsJoinHashTable::getInstance(), and Executor::skipFragmentPair().

747  {
748  std::vector<InnerOuter> result;
749  const auto lhs_tuple_expr =
750  dynamic_cast<const Analyzer::ExpressionTuple*>(condition->get_left_operand());
751  const auto rhs_tuple_expr =
752  dynamic_cast<const Analyzer::ExpressionTuple*>(condition->get_right_operand());
753 
754  CHECK_EQ(static_cast<bool>(lhs_tuple_expr), static_cast<bool>(rhs_tuple_expr));
755  if (lhs_tuple_expr) {
756  const auto& lhs_tuple = lhs_tuple_expr->getTuple();
757  const auto& rhs_tuple = rhs_tuple_expr->getTuple();
758  CHECK_EQ(lhs_tuple.size(), rhs_tuple.size());
759  for (size_t i = 0; i < lhs_tuple.size(); ++i) {
760  result.push_back(normalizeColumnPair(lhs_tuple[i].get(),
761  rhs_tuple[i].get(),
762  cat,
763  temporary_tables,
764  condition->is_overlaps_oper()));
765  }
766  } else {
767  CHECK(!lhs_tuple_expr && !rhs_tuple_expr);
768  result.push_back(normalizeColumnPair(condition->get_left_operand(),
769  condition->get_right_operand(),
770  cat,
771  temporary_tables,
772  condition->is_overlaps_oper()));
773  }
774 
775  return result;
776 }
#define CHECK_EQ(x, y)
Definition: Logger.h:217
std::string cat(Ts &&...args)
const Expr * get_right_operand() const
Definition: Analyzer.h:442
static InnerOuter normalizeColumnPair(const Analyzer::Expr *lhs, const Analyzer::Expr *rhs, const Catalog_Namespace::Catalog &cat, const TemporaryTables *temporary_tables, const bool is_overlaps_join=false)
Definition: HashJoin.cpp:603
#define CHECK(condition)
Definition: Logger.h:209
const Expr * get_left_operand() const
Definition: Analyzer.h:441
bool is_overlaps_oper() const
Definition: Analyzer.h:439

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual size_t HashJoin::offsetBufferOff ( ) const
pure virtualnoexcept
virtual size_t HashJoin::payloadBufferOff ( ) const
pure virtualnoexcept
virtual DecodedJoinHashBufferSet HashJoin::toSet ( const ExecutorDeviceType  device_type,
const int  device_id 
) const
pure virtual
virtual std::string HashJoin::toString ( const ExecutorDeviceType  device_type,
const int  device_id = 0,
bool  raw = false 
) const
pure virtual
std::string HashJoin::toStringFlat32 ( const ExecutorDeviceType  device_type,
const int  device_id 
) const
virtual

Definition at line 117 of file HashJoin.cpp.

118  {
119  return toStringFlat<int32_t>(this, device_type, device_id);
120 }
std::string HashJoin::toStringFlat64 ( const ExecutorDeviceType  device_type,
const int  device_id 
) const
virtual

Definition at line 112 of file HashJoin.cpp.

113  {
114  return toStringFlat<int64_t>(this, device_type, device_id);
115 }

Member Data Documentation


The documentation for this class was generated from the following files: