Package io.substrait.relation
Class ConsistentPartitionWindow
java.lang.Object
io.substrait.relation.AbstractRel
io.substrait.relation.SingleInputRel
io.substrait.relation.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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA single window function invocation with its arguments, options, output type, phase/invocation, and window bounds. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<O,C extends VisitationContext, E extends Exception>
Oaccept(RelVisitor<O, C, E> visitor, C context) Accepts a relation visitor.builder()Creates a builder forConsistentPartitionWindow.protected Type.StructDerives the output record type by appending window outputs to the input type.abstract List<Expression>Returns the expressions used to partition the input rows.abstract List<Expression.SortField>getSorts()Returns the sort fields defining row order within each partition.Returns the window function invocations applied over the input.Methods inherited from class io.substrait.relation.SingleInputRel
getInput, getInputsMethods inherited from class io.substrait.relation.AbstractRel
getRecordTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.substrait.relation.HasExtension
getExtensionMethods inherited from interface io.substrait.relation.Rel
getCommonExtension, getHint, getRemap
-
Constructor Details
-
ConsistentPartitionWindow
public ConsistentPartitionWindow()
-
-
Method Details
-
getWindowFunctions
Returns the window function invocations applied over the input.- Returns:
- list of window function invocations
-
getPartitionExpressions
Returns the expressions used to partition the input rows.- Returns:
- list of partitioning expressions
-
getSorts
Returns the sort fields defining row order within each partition.- Returns:
- list of sort fields
-
deriveRecordType
Derives the output record type by appending window outputs to the input type.- Specified by:
deriveRecordTypein classAbstractRel- Returns:
- the resulting struct type
-
accept
public <O,C extends VisitationContext, O acceptE extends Exception> (RelVisitor<O, C, throws EE> visitor, C context) Accepts a relation visitor. -
builder
Creates a builder forConsistentPartitionWindow.- Returns:
- a new immutable builder
-