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 Constructor Description PrunePatternRecognitionSourceColumns()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Resultapply(PatternRecognitionNode node, Captures captures, Rule.Context context)Pattern<PatternRecognitionNode>getPattern()Returns a pattern to which plan nodes this rule applies.
-
-
-
Method Detail
-
getPattern
public Pattern<PatternRecognitionNode> getPattern()
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<PatternRecognitionNode>
-
apply
public Rule.Result apply(PatternRecognitionNode node, Captures captures, Rule.Context context)
- Specified by:
applyin interfaceRule<PatternRecognitionNode>
-
-