Class Match

All Implemented Interfaces:
Cloneable, RelOptNode, RelNode
Direct Known Subclasses:
Bindables.BindableMatch, EnumerableMatch, LogicalMatch

public abstract class Match extends SingleRel
Relational expression that represent a MATCH_RECOGNIZE node.

Each output row has the columns defined in the measure statements.

  • Field Details

    • measures

      protected final com.google.common.collect.ImmutableMap<String,RexNode> measures
    • pattern

      protected final RexNode pattern
    • strictStart

      protected final boolean strictStart
    • strictEnd

      protected final boolean strictEnd
    • allRows

      protected final boolean allRows
    • after

      protected final RexNode after
    • patternDefinitions

      protected final com.google.common.collect.ImmutableMap<String,RexNode> patternDefinitions
    • aggregateCalls

      protected final Set<Match.RexMRAggCall> aggregateCalls
    • aggregateCallsPreVar

      protected final Map<String,SortedSet<Match.RexMRAggCall>> aggregateCallsPreVar
    • subsets

      protected final com.google.common.collect.ImmutableMap<String,SortedSet<String>> subsets
    • partitionKeys

      protected final ImmutableBitSet partitionKeys
    • orderKeys

      protected final RelCollation orderKeys
    • interval

      protected final @Nullable RexNode 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 - Cluster
      traitSet - Trait set
      input - Input relational expression
      rowType - Row type
      pattern - Regular expression that defines pattern variables
      strictStart - Whether it is a strict start pattern
      strictEnd - Whether it is a strict end pattern
      patternDefinitions - Pattern definitions
      measures - Measure definitions
      after - After match definitions
      subsets - Subsets of pattern variables
      allRows - Whether all rows per match (false means one row per match)
      partitionKeys - Partition by columns
      orderKeys - Order by columns
      interval - Interval definition, null if WITHIN clause is not defined
  • Method Details

    • getMeasures

      public com.google.common.collect.ImmutableMap<String,RexNode> getMeasures()
    • getAfter

      public RexNode getAfter()
    • getPattern

      public RexNode getPattern()
    • isStrictStart

      public boolean isStrictStart()
    • isStrictEnd

      public boolean isStrictEnd()
    • isAllRows

      public boolean isAllRows()
    • getPatternDefinitions

      public com.google.common.collect.ImmutableMap<String,RexNode> getPatternDefinitions()
    • getSubsets

      public com.google.common.collect.ImmutableMap<String,SortedSet<String>> getSubsets()
    • getPartitionKeys

      public ImmutableBitSet getPartitionKeys()
    • getOrderKeys

      public RelCollation getOrderKeys()
    • getInterval

      public @Nullable RexNode getInterval()
    • explainTerms

      public RelWriter explainTerms(RelWriter pw)
      Description copied from class: AbstractRelNode
      Describes the inputs and attributes of this relational expression. Each node should call super.explainTerms, then call the RelWriter.input(String, RelNode) and RelWriter.item(String, Object) methods for each input and attribute.
      Overrides:
      explainTerms in class SingleRel
      Parameters:
      pw - Plan writer
      Returns:
      Plan writer for fluent-explain pattern