MySQL  8.0.28
Source Code Documentation
JoinHypergraph Struct Reference

A struct containing a join hypergraph of a single query block, encapsulating the constraints given by the relational expressions (e.g. More...

#include <make_join_hypergraph.h>

Classes

struct  Node
 

Public Member Functions

 JoinHypergraph (MEM_ROOT *mem_root, const Query_block *query_block)
 
const Query_blockquery_block () const
 Returns a pointer to the query block that is being planned. More...
 
const JOINjoin () const
 Returns a pointer to the JOIN object of the query block being planned. More...
 

Public Attributes

hypergraph::Hypergraph graph
 
std::array< int, MAX_TABLEStable_num_to_node_num
 
Mem_root_array< Nodenodes
 
Mem_root_array< JoinPredicateedges
 
Mem_root_array< Predicatepredicates
 
unsigned num_where_predicates = 0
 
OverflowBitset materializable_predicates {0}
 
mem_root_unordered_map< Item *, int > sargable_join_predicates
 

Private Attributes

const Query_blockm_query_block
 A pointer to the query block being planned. More...
 

Detailed Description

A struct containing a join hypergraph of a single query block, encapsulating the constraints given by the relational expressions (e.g.

inner joins are more freely reorderable than outer joins).

Since the Hypergraph class does not carry any payloads for nodes and edges, and we need to associate e.g. TABLE pointers with each node, we store our extra data in “nodes” and “edges”, indexed the same way the hypergraph is indexed.

Constructor & Destructor Documentation

◆ JoinHypergraph()

JoinHypergraph::JoinHypergraph ( MEM_ROOT mem_root,
const Query_block query_block 
)
inline

Member Function Documentation

◆ join()

const JOIN * JoinHypergraph::join ( ) const

Returns a pointer to the JOIN object of the query block being planned.

◆ query_block()

const Query_block* JoinHypergraph::query_block ( ) const
inline

Returns a pointer to the query block that is being planned.

Member Data Documentation

◆ edges

Mem_root_array<JoinPredicate> JoinHypergraph::edges

◆ graph

hypergraph::Hypergraph JoinHypergraph::graph

◆ m_query_block

const Query_block* JoinHypergraph::m_query_block
private

A pointer to the query block being planned.

◆ materializable_predicates

OverflowBitset JoinHypergraph::materializable_predicates {0}

◆ nodes

Mem_root_array<Node> JoinHypergraph::nodes

◆ num_where_predicates

unsigned JoinHypergraph::num_where_predicates = 0

◆ predicates

Mem_root_array<Predicate> JoinHypergraph::predicates

◆ sargable_join_predicates

mem_root_unordered_map<Item *, int> JoinHypergraph::sargable_join_predicates

◆ table_num_to_node_num

std::array<int, MAX_TABLES> JoinHypergraph::table_num_to_node_num

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