MySQL 9.1.0
Source Code Documentation
hash_join_iterator.cc File Reference
#include "sql/iterators/hash_join_iterator.h"
#include <algorithm>
#include <atomic>
#include <bit>
#include <cassert>
#include <cmath>
#include <memory>
#include <optional>
#include <utility>
#include <vector>
#include "field_types.h"
#include "my_alloc.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "my_xxhash.h"
#include "mysql/components/services/bits/psi_bits.h"
#include "mysqld_error.h"
#include "sql/item.h"
#include "sql/item_cmpfunc.h"
#include "sql/iterators/hash_join_buffer.h"
#include "sql/iterators/row_iterator.h"
#include "sql/pfs_batch_mode.h"
#include "sql/sql_class.h"
#include "sql/sql_list.h"
#include "sql/system_variables.h"
#include "sql/table.h"

Functions

static void MarkCopyBlobsIfTableContainsGeometry (const pack_rows::TableCollection &table_collection)
 
static bool ConstructJoinKey (THD *thd, const Prealloced_array< HashJoinCondition, 4 > &join_conditions, table_map tables_bitmap, String *join_key_buffer)
 
static bool WriteRowToChunk (THD *thd, Mem_root_array< ChunkPair > *chunks, bool write_to_build_chunk, const pack_rows::TableCollection &tables, const Prealloced_array< HashJoinCondition, 4 > &join_conditions, const uint32 xxhash_seed, bool row_has_match, bool store_row_with_null_in_join_key, String *join_key_and_row_buffer)
 
static bool WriteRowsToChunks (THD *thd, RowIterator *iterator, const pack_rows::TableCollection &tables, const Prealloced_array< HashJoinCondition, 4 > &join_conditions, const uint32 xxhash_seed, Mem_root_array< ChunkPair > *chunks, bool write_to_build_chunk, bool write_rows_with_null_in_join_key, table_map tables_to_get_rowid_for, String *join_key_buffer)
 
static bool InitializeChunkFiles (size_t estimated_rows_produced_by_join, size_t rows_in_hash_table, size_t max_chunk_files, const pack_rows::TableCollection &probe_tables, const pack_rows::TableCollection &build_tables, bool include_match_flag_for_probe, Mem_root_array< ChunkPair > *chunk_pairs)
 

Variables

static constexpr size_t kZeroKeyLengthHash = 2669509769
 

Function Documentation

◆ ConstructJoinKey()

static bool ConstructJoinKey ( THD thd,
const Prealloced_array< HashJoinCondition, 4 > &  join_conditions,
table_map  tables_bitmap,
String join_key_buffer 
)
static

◆ InitializeChunkFiles()

static bool InitializeChunkFiles ( size_t  estimated_rows_produced_by_join,
size_t  rows_in_hash_table,
size_t  max_chunk_files,
const pack_rows::TableCollection probe_tables,
const pack_rows::TableCollection build_tables,
bool  include_match_flag_for_probe,
Mem_root_array< ChunkPair > *  chunk_pairs 
)
static

◆ MarkCopyBlobsIfTableContainsGeometry()

static void MarkCopyBlobsIfTableContainsGeometry ( const pack_rows::TableCollection table_collection)
static

◆ WriteRowsToChunks()

static bool WriteRowsToChunks ( THD thd,
RowIterator iterator,
const pack_rows::TableCollection tables,
const Prealloced_array< HashJoinCondition, 4 > &  join_conditions,
const uint32  xxhash_seed,
Mem_root_array< ChunkPair > *  chunks,
bool  write_to_build_chunk,
bool  write_rows_with_null_in_join_key,
table_map  tables_to_get_rowid_for,
String join_key_buffer 
)
static

◆ WriteRowToChunk()

static bool WriteRowToChunk ( THD thd,
Mem_root_array< ChunkPair > *  chunks,
bool  write_to_build_chunk,
const pack_rows::TableCollection tables,
const Prealloced_array< HashJoinCondition, 4 > &  join_conditions,
const uint32  xxhash_seed,
bool  row_has_match,
bool  store_row_with_null_in_join_key,
String join_key_and_row_buffer 
)
static

Variable Documentation

◆ kZeroKeyLengthHash

constexpr size_t kZeroKeyLengthHash = 2669509769
staticconstexpr