MySQL 9.1.0
Source Code Documentation
HashJoinCondition Class Reference

A class that represents a join condition in a hash join. More...

#include <item_cmpfunc.h>

Public Member Functions

 HashJoinCondition (Item_eq_base *join_condition, MEM_ROOT *mem_root)
 
Item_eq_basejoin_condition () const
 
Itemleft_extractor () const
 
Itemright_extractor () const
 
bool left_uses_any_table (table_map tables) const
 
bool right_uses_any_table (table_map tables) const
 
size_t max_character_length () const
 
bool store_full_sort_key () const
 
bool null_equals_null () const
 Returns true if this join condition evaluates to TRUE if both operands are NULL. More...
 

Private Attributes

Item_eq_basem_join_condition
 
Itemm_left_extractor
 
Itemm_right_extractor
 
const table_map m_left_used_tables
 
const table_map m_right_used_tables
 
const size_t m_max_character_length {0}
 
bool m_store_full_sort_key
 
bool m_null_equals_null
 

Detailed Description

A class that represents a join condition in a hash join.

The class holds an equality condition, as well as a pre-calculated bitmap of the used tables (Item::used_tables()) for each side of the condition.

The class also contains one Item for each side of the condition. In most cases, the Item is only a pointer to the left/right Item of the join condition. But for certain data types (DECIMAL, DOUBLE(M, N), FLOAT(M, N)), the Item might be a typecast. Either way, the caller should use these Items when i.e. reading the values from the join condition, so that the values are read in the right data type context. See the comments for Item_eq_base::create_cast_if_needed for more details around this.

Constructor & Destructor Documentation

◆ HashJoinCondition()

HashJoinCondition::HashJoinCondition ( Item_eq_base join_condition,
MEM_ROOT mem_root 
)

Member Function Documentation

◆ join_condition()

Item_eq_base * HashJoinCondition::join_condition ( ) const
inline

◆ left_extractor()

Item * HashJoinCondition::left_extractor ( ) const
inline

◆ left_uses_any_table()

bool HashJoinCondition::left_uses_any_table ( table_map  tables) const
inline

◆ max_character_length()

size_t HashJoinCondition::max_character_length ( ) const
inline

◆ null_equals_null()

bool HashJoinCondition::null_equals_null ( ) const
inline

Returns true if this join condition evaluates to TRUE if both operands are NULL.

◆ right_extractor()

Item * HashJoinCondition::right_extractor ( ) const
inline

◆ right_uses_any_table()

bool HashJoinCondition::right_uses_any_table ( table_map  tables) const
inline

◆ store_full_sort_key()

bool HashJoinCondition::store_full_sort_key ( ) const
inline

Member Data Documentation

◆ m_join_condition

Item_eq_base* HashJoinCondition::m_join_condition
private

◆ m_left_extractor

Item* HashJoinCondition::m_left_extractor
private

◆ m_left_used_tables

const table_map HashJoinCondition::m_left_used_tables
private

◆ m_max_character_length

const size_t HashJoinCondition::m_max_character_length {0}
private

◆ m_null_equals_null

bool HashJoinCondition::m_null_equals_null
private

◆ m_right_extractor

Item* HashJoinCondition::m_right_extractor
private

◆ m_right_used_tables

const table_map HashJoinCondition::m_right_used_tables
private

◆ m_store_full_sort_key

bool HashJoinCondition::m_store_full_sort_key
private

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