Class PrunePatternRecognitionSourceColumns

java.lang.Object
io.trino.sql.planner.iterative.rule.PrunePatternRecognitionSourceColumns
All Implemented Interfaces:
Rule<PatternRecognitionNode>

public class PrunePatternRecognitionSourceColumns extends Object implements Rule<PatternRecognitionNode>
This rule restricts the inputs to PatternRecognitionNode based on which symbols are used by the inner structures of the PatternRecognitionNode. As opposite to PrunePattenRecognitionColumns rule, this rule is not aware of which output symbols of the PatternRecognitionNode are used by the upstream plan. Consequentially, it can only prune the inputs which are not exposed to the output. Such possibility applies only to PatternRecognitionNode with the option `ONE ROW PER MATCH`, where only the partitioning symbols are passed to output.

This rule is complementary to PrunePatternRecognitionColumns. It can prune PatternRecognitionNode's inputs in cases when there is no narrowing projection on top of the node.