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.
-
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(PatternRecognitionNode node, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.
-
Constructor Details
-
PrunePatternRecognitionSourceColumns
public PrunePatternRecognitionSourceColumns()
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<PatternRecognitionNode>
-
apply
- Specified by:
applyin interfaceRule<PatternRecognitionNode>
-