Class PruneTableFunctionProcessorSourceColumns
java.lang.Object
io.trino.sql.planner.iterative.rule.PruneTableFunctionProcessorSourceColumns
- All Implemented Interfaces:
Rule<TableFunctionProcessorNode>
public class PruneTableFunctionProcessorSourceColumns
extends Object
implements Rule<TableFunctionProcessorNode>
This rule prunes unreferenced outputs of TableFunctionProcessorNode.
First, it extracts all symbols required for:
- pass-through
- table function computation
- partitioning and ordering (including the hashSymbol)
Next, a mapping of input symbols to marker symbols is updated
so that it only contains mappings for the required symbols.
Last, all the remaining marker symbols are added to the collection
of required symbols.
Any source output symbols not included in the required symbols
can be pruned.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(TableFunctionProcessorNode node, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.
-
Constructor Details
-
PruneTableFunctionProcessorSourceColumns
public PruneTableFunctionProcessorSourceColumns()
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<TableFunctionProcessorNode>
-
apply
- Specified by:
applyin interfaceRule<TableFunctionProcessorNode>
-