Package org.apache.calcite.rel.core
Class Match
java.lang.Object
org.apache.calcite.rel.AbstractRelNode
org.apache.calcite.rel.SingleRel
org.apache.calcite.rel.core.Match
- All Implemented Interfaces:
Cloneable
,RelOptNode
,RelNode
- Direct Known Subclasses:
Bindables.BindableMatch
,EnumerableMatch
,LogicalMatch
Relational expression that represent a MATCH_RECOGNIZE node.
Each output row has the columns defined in the measure statements.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Aggregate calls in match recognize.Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
Field Summary
Modifier and TypeFieldDescriptionprotected final RexNode
protected final Set<Match.RexMRAggCall>
protected final Map<String,
SortedSet<Match.RexMRAggCall>> protected final boolean
protected final @Nullable RexNode
protected final RelCollation
protected final ImmutableBitSet
protected final RexNode
protected final boolean
protected final boolean
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
Constructor Summary
ModifierConstructorDescriptionprotected
Match
(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, RelDataType rowType, RexNode pattern, boolean strictStart, boolean strictEnd, Map<String, RexNode> patternDefinitions, Map<String, RexNode> measures, RexNode after, Map<String, ? extends SortedSet<String>> subsets, boolean allRows, ImmutableBitSet partitionKeys, RelCollation orderKeys, @Nullable RexNode interval) Creates a Match. -
Method Summary
Methods inherited from class org.apache.calcite.rel.SingleRel
childrenAccept, deriveRowType, estimateRowCount, getInput, getInputs, replaceInput
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, accept, collectVariablesSet, collectVariablesUsed, computeSelfCost, copy, deepEquals, deepHashCode, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.calcite.rel.RelNode
explain, fieldIsNullable, stripped
-
Field Details
-
measures
-
pattern
-
strictStart
protected final boolean strictStart -
strictEnd
protected final boolean strictEnd -
allRows
protected final boolean allRows -
after
-
patternDefinitions
-
aggregateCalls
-
aggregateCallsPreVar
-
subsets
-
partitionKeys
-
orderKeys
-
interval
-
-
Constructor Details
-
Match
protected Match(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, RelDataType rowType, RexNode pattern, boolean strictStart, boolean strictEnd, Map<String, RexNode> patternDefinitions, Map<String, RexNode> measures, RexNode after, Map<String, ? extends SortedSet<String>> subsets, boolean allRows, ImmutableBitSet partitionKeys, RelCollation orderKeys, @Nullable RexNode interval) Creates a Match.- Parameters:
cluster
- ClustertraitSet
- Trait setinput
- Input relational expressionrowType
- Row typepattern
- Regular expression that defines pattern variablesstrictStart
- Whether it is a strict start patternstrictEnd
- Whether it is a strict end patternpatternDefinitions
- Pattern definitionsmeasures
- Measure definitionsafter
- After match definitionssubsets
- Subsets of pattern variablesallRows
- Whether all rows per match (false means one row per match)partitionKeys
- Partition by columnsorderKeys
- Order by columnsinterval
- Interval definition, null if WITHIN clause is not defined
-
-
Method Details
-
getMeasures
-
getAfter
-
getPattern
-
isStrictStart
public boolean isStrictStart() -
isStrictEnd
public boolean isStrictEnd() -
isAllRows
public boolean isAllRows() -
getPatternDefinitions
-
getSubsets
-
getPartitionKeys
-
getOrderKeys
-
getInterval
-
explainTerms
Description copied from class:AbstractRelNode
Describes the inputs and attributes of this relational expression. Each node should callsuper.explainTerms
, then call theRelWriter.input(String, RelNode)
andRelWriter.item(String, Object)
methods for each input and attribute.- Overrides:
explainTerms
in classSingleRel
- Parameters:
pw
- Plan writer- Returns:
- Plan writer for fluent-explain pattern
-