Class ConsistentPartitionWindow

All Implemented Interfaces:
HasExtension, Rel
Direct Known Subclasses:
ImmutableConsistentPartitionWindow

@Immutable @Enclosing public abstract class ConsistentPartitionWindow extends SingleInputRel implements HasExtension
A window relation that ensures consistent partitioning and ordering across all window function invocations in a single input relation. Provides partition expressions, sort keys, and window functions.
  • Constructor Details

    • ConsistentPartitionWindow

      public ConsistentPartitionWindow()
  • Method Details

    • getWindowFunctions

      public abstract List<ConsistentPartitionWindow.WindowRelFunctionInvocation> getWindowFunctions()
      Returns the window function invocations applied over the input.
      Returns:
      list of window function invocations
    • getPartitionExpressions

      public abstract List<Expression> getPartitionExpressions()
      Returns the expressions used to partition the input rows.
      Returns:
      list of partitioning expressions
    • getSorts

      public abstract List<Expression.SortField> getSorts()
      Returns the sort fields defining row order within each partition.
      Returns:
      list of sort fields
    • deriveRecordType

      protected Type.Struct deriveRecordType()
      Derives the output record type by appending window outputs to the input type.
      Specified by:
      deriveRecordType in class AbstractRel
      Returns:
      the resulting struct type
    • accept

      public <O, C extends VisitationContext, E extends Exception> O accept(RelVisitor<O,C,E> visitor, C context) throws E
      Accepts a relation visitor.
      Specified by:
      accept in interface Rel
      Type Parameters:
      O - the result type
      C - the visitation context type
      E - the exception type that may be thrown
      Parameters:
      visitor - the relation visitor
      context - the visitation context
      Returns:
      the visit result
      Throws:
      E - if the visitor signals an error
    • builder

      Creates a builder for ConsistentPartitionWindow.
      Returns:
      a new immutable builder