1#ifndef SQL_ITERATORS_HASH_JOIN_BUFFER_H_ 
    2#define SQL_ITERATORS_HASH_JOIN_BUFFER_H_ 
  108using Key = std::string_view;
 
  130                    std::vector<HashJoinCondition> join_conditions,
 
  131                    size_t max_mem_available_bytes);
 
  159  std::optional<LinkedImmutableString> 
find(
Key key) 
const;
 
  161  std::optional<LinkedImmutableString> 
first_row() 
const;
 
A class that represents a join condition in a hash join.
Definition: item_cmpfunc.h:92
 
LinkedImmutableString is designed for storing rows (values) in hash join.
Definition: immutable_string.h:173
 
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:169
 
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
 
Definition: hash_join_buffer.h:125
 
String m_buffer
Definition: hash_join_buffer.h:199
 
bool contains(const Key &key) const
Definition: hash_join_buffer.h:170
 
size_t m_row_size_upper_bound
Definition: hash_join_buffer.h:200
 
std::unique_ptr< HashMap > m_hash_map
Definition: hash_join_buffer.h:195
 
std::optional< LinkedImmutableString > first_row() const
Definition: hash_join_buffer.cc:349
 
size_t size() const
Definition: hash_join_buffer.cc:341
 
bool Init()
Definition: hash_join_buffer.cc:204
 
bool Initialized() const
Definition: hash_join_buffer.h:168
 
bool empty() const
Definition: hash_join_buffer.h:157
 
HashJoinRowBuffer(pack_rows::TableCollection tables, std::vector< HashJoinCondition > join_conditions, size_t max_mem_available_bytes)
Definition: hash_join_buffer.cc:186
 
std::optional< LinkedImmutableString > find(Key key) const
Definition: hash_join_buffer.cc:343
 
LinkedImmutableString m_last_row_stored
Definition: hash_join_buffer.h:211
 
const std::vector< HashJoinCondition > m_join_conditions
Definition: hash_join_buffer.h:174
 
const size_t m_max_mem_available
Definition: hash_join_buffer.h:203
 
StoreRowResult StoreRow(THD *thd, bool reject_duplicate_keys)
Store the row that is currently lying in the tables record buffers.
Definition: hash_join_buffer.cc:234
 
const pack_rows::TableCollection m_tables
Definition: hash_join_buffer.h:180
 
LinkedImmutableString StoreLinkedImmutableStringFromTableBuffers(LinkedImmutableString next_ptr, StoreLinkedInfo *info)
Definition: hash_join_buffer.cc:165
 
LinkedImmutableString LastRowStored() const
Definition: hash_join_buffer.h:163
 
MEM_ROOT m_overflow_mem_root
Definition: hash_join_buffer.h:192
 
MEM_ROOT m_mem_root
Definition: hash_join_buffer.h:184
 
A structure that contains a list of input tables for a hash join operation, BKA join operation or a s...
Definition: pack_rows.h:84
 
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
 
LinkedImmutableString StoreLinkedImmutableStringFromTableBuffers(MEM_ROOT *mem_root, MEM_ROOT *overflow_mem_root, const pack_rows::TableCollection &tables, LinkedImmutableString next_ptr, size_t row_size_upper_bound, StoreLinkedInfo *info)
External interface to the corresponding member in HashJoinRowBuffer.
Definition: hash_join_buffer.cc:48
 
ImmutableString defines a storage format for strings that is designed to be as compact as possible,...
 
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
 
Definition: hash_join_buffer.cc:103
 
std::string_view Key
The key type for the hash structure in HashJoinRowBuffer.
Definition: hash_join_buffer.h:108
 
Key BufferRow
Definition: hash_join_buffer.h:111
 
void LoadImmutableStringIntoTableBuffers(const TableCollection &tables, LinkedImmutableString row)
Definition: hash_join_buffer.cc:181
 
void LoadBufferRowIntoTableBuffers(const TableCollection &tables, BufferRow row)
Definition: hash_join_buffer.cc:174
 
StoreRowResult
Definition: hash_join_buffer.h:123
 
Generic routines for packing rows (possibly from multiple tables at the same time) into strings,...
 
required string key
Definition: replication_asynchronous_connection_failover.proto:60
 
Our own string classes, used pervasively throughout the executor.
 
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
 
Definition: hash_join_buffer.h:75
 
size_t m_bytes_needed
Definition: hash_join_buffer.h:78
 
bool m_full
Definition: hash_join_buffer.h:77
 
bool m_dont_error
Definition: hash_join_buffer.h:76