MySQL 8.3.0
Source Code Documentation
materialize_iterator Namespace Reference

Classes

struct  Operand
 An operand (query block) to be materialized by MaterializeIterator. More...
 
class  SpillState
 Contains spill state for set operations' use of in-memory hash map. More...
 

Typedefs

using Operands = Mem_root_array< materialize_iterator::Operand >
 

Functions

RowIteratorCreateIterator (THD *thd, Mem_root_array< materialize_iterator::Operand > operands, const MaterializePathParameters *path_params, unique_ptr_destroy_only< RowIterator > table_iterator, JOIN *join)
 Create an iterator that materializes a set of row into a temporary table and sets up a (pre-existing) iterator to access that. More...
 

Typedef Documentation

◆ Operands

Function Documentation

◆ CreateIterator()

RowIterator * materialize_iterator::CreateIterator ( THD thd,
Mem_root_array< materialize_iterator::Operand operands,
const MaterializePathParameters path_params,
unique_ptr_destroy_only< RowIterator table_iterator,
JOIN join 
)

Create an iterator that materializes a set of row into a temporary table and sets up a (pre-existing) iterator to access that.

See also
MaterializeIterator.
Parameters
thdThread handler.
operandsList of operands (query blocks) to materialize.
path_paramsMaterializePath settings.
table_iteratorIterator used for accessing the temporary table after materialization.
joinWhen materializing within the same JOIN (e.g., into a temporary table before sorting), as opposed to a derived table or a CTE, we may need to change the slice on the join before returning rows from the result table. If so, join and ref_slice would need to be set, and query_blocks_to_materialize should contain only one member, with the same join.
Returns
the iterator.