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.