MySQL 9.1.0
Source Code Documentation
CompanionSetCollection Class Referencefinal

The collection of CompanionSet objects for a given JoinHypergraph. More...

#include <relational_expression.h>

Public Member Functions

 CompanionSetCollection (THD *thd, struct RelationalExpression *root)
 
 CompanionSetCollection (const CompanionSetCollection &)=delete
 No copying. More...
 
CompanionSetCollectionoperator= (const CompanionSetCollection &)=delete
 
CompanionSetFind (table_map tables)
 
const CompanionSetFind (table_map tables) const
 
std::string ToString () const
 For trace and debugging. More...
 

Private Member Functions

void Compute (THD *thd, RelationalExpression *expr, CompanionSet *current_set)
 Compute the CompanionSet of 'expr' and all of its descendants. More...
 
CompanionSetFindInternal (table_map tables) const
 For a given set of tables, find the CompanionSet they are part of Returns nullptr if the tables are in different (i.e., incompatible) CompanionSet instances. More...
 

Private Attributes

std::array< CompanionSet *, MAX_TABLESm_table_num_to_companion_set {nullptr}
 A mapping from table number to CompanionSet. More...
 

Detailed Description

The collection of CompanionSet objects for a given JoinHypergraph.

Constructor & Destructor Documentation

◆ CompanionSetCollection() [1/2]

CompanionSetCollection::CompanionSetCollection ( THD thd,
struct RelationalExpression root 
)
inline

◆ CompanionSetCollection() [2/2]

CompanionSetCollection::CompanionSetCollection ( const CompanionSetCollection )
delete

No copying.

Member Function Documentation

◆ Compute()

void CompanionSetCollection::Compute ( THD thd,
RelationalExpression expr,
CompanionSet current_set 
)
private

Compute the CompanionSet of 'expr' and all of its descendants.

Parameters
thdThe current thread.
exprCompute CompanionSet of this and all of its descendants.
current_setThe CompanionSet to which 'expr' will belong, or nullptr if 'expr' is the root of a new set.

◆ Find() [1/2]

CompanionSet * CompanionSetCollection::Find ( table_map  tables)
inline

◆ Find() [2/2]

const CompanionSet * CompanionSetCollection::Find ( table_map  tables) const
inline

◆ FindInternal()

CompanionSet * CompanionSetCollection::FindInternal ( table_map  tables) const
private

For a given set of tables, find the CompanionSet they are part of Returns nullptr if the tables are in different (i.e., incompatible) CompanionSet instances.

If so, a condition using this set of tables can not induce a new (cycle) edge in the hypergraph, as there are non-inner joins in the way.

◆ operator=()

CompanionSetCollection & CompanionSetCollection::operator= ( const CompanionSetCollection )
delete

◆ ToString()

std::string CompanionSetCollection::ToString ( ) const

For trace and debugging.

Member Data Documentation

◆ m_table_num_to_companion_set

std::array<CompanionSet *, MAX_TABLES> CompanionSetCollection::m_table_num_to_companion_set {nullptr}
private

A mapping from table number to CompanionSet.


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