Module join_selection

Source
Expand description

The JoinSelection rule tries to modify a given plan so that it can accommodate infinite sources and utilize statistical information (if there is any) to obtain more performant plans. To achieve the first goal, it tries to transform a non-runnable query (with the given infinite sources) into a runnable query by replacing pipeline-breaking join operations with pipeline-friendly ones. To achieve the second goal, it selects the proper PartitionMode and the build side using the available statistics for hash joins.

Structs§

JoinSelection
The JoinSelection rule tries to modify a given plan so that it can accommodate infinite sources and optimize joins in the plan according to available statistical information, if there is any.

Functions§

hash_join_swap_subrule
This subrule will swap build/probe sides of a hash join depending on whether one of its inputs may produce an infinite stream of records. The rule ensures that the left (build) side of the hash join always operates on an input stream that will produce a finite set of records. If the left side can not be chosen to be “finite”, the join sides stay the same as the original query.
swap_hash_joinDeprecated
This function swaps the inputs of the given join operator. This function is public so other downstream projects can use it to construct HashJoinExec with right side as the build side.

Type Aliases§

PipelineFixerSubrule
Pipeline-fixing join selection subrule.