Package io.substrait.relation
Class ImmutableConsistentPartitionWindow
java.lang.Object
io.substrait.relation.AbstractRel
io.substrait.relation.SingleInputRel
io.substrait.relation.ConsistentPartitionWindow
io.substrait.relation.ImmutableConsistentPartitionWindow
- All Implemented Interfaces:
HasExtension,Rel
Immutable implementation of
ConsistentPartitionWindow.
Use the builder to create immutable instances:
ImmutableConsistentPartitionWindow.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableConsistentPartitionWindow.static final classImmutable implementation ofConsistentPartitionWindow.WindowRelFunctionInvocation. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableConsistentPartitionWindow.copyOf(ConsistentPartitionWindow instance) Creates an immutable copy of aConsistentPartitionWindowvalue.booleanThis instance is equal to all instances ofImmutableConsistentPartitionWindowthat have equal attribute values.getHint()getInput()Returns the expressions used to partition the input rows.getRemap()getSorts()Returns the sort fields defining row order within each partition.Returns the window function invocations applied over the input.inthashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,input,windowFunctions,partitionExpressions,sorts.toString()Prints the immutable valueConsistentPartitionWindowwith attribute values.Copy the current immutable object by setting a present value for the optionalcommonExtensionattribute.withCommonExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for thecommonExtensionattribute.withExtension(AdvancedExtension value) Copy the current immutable object by setting a present value for the optionalextensionattribute.withExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for theextensionattribute.Copy the current immutable object by setting a present value for the optionalhintattribute.Copy the current immutable object by setting an optional value for thehintattribute.Copy the current immutable object by setting a value for theinputattribute.withPartitionExpressions(Expression... elements) Copy the current immutable object with elements that replace the content ofpartitionExpressions.withPartitionExpressions(Iterable<? extends Expression> elements) Copy the current immutable object with elements that replace the content ofpartitionExpressions.Copy the current immutable object by setting a present value for the optionalremapattribute.Copy the current immutable object by setting an optional value for theremapattribute.withSorts(Expression.SortField... elements) Copy the current immutable object with elements that replace the content ofsorts.withSorts(Iterable<? extends Expression.SortField> elements) Copy the current immutable object with elements that replace the content ofsorts.Copy the current immutable object with elements that replace the content ofwindowFunctions.withWindowFunctions(Iterable<? extends ConsistentPartitionWindow.WindowRelFunctionInvocation> elements) Copy the current immutable object with elements that replace the content ofwindowFunctions.Methods inherited from class io.substrait.relation.ConsistentPartitionWindow
accept, deriveRecordTypeMethods inherited from class io.substrait.relation.SingleInputRel
getInputsMethods inherited from class io.substrait.relation.AbstractRel
getRecordType
-
Method Details
-
getExtension
- Returns:
- the
AdvancedExtensionassociated directly with the class
-
getRemap
- Returns:
- The value of the
remapattribute
-
getCommonExtension
- Returns:
- the
AdvancedExtensionassociated with aRelCommonmessage, if present
-
getHint
- Returns:
- The value of the
hintattribute
-
getInput
- Specified by:
getInputin classSingleInputRel- Returns:
- The value of the
inputattribute
-
getWindowFunctions
Returns the window function invocations applied over the input.- Specified by:
getWindowFunctionsin classConsistentPartitionWindow- Returns:
- list of window function invocations
-
getPartitionExpressions
Returns the expressions used to partition the input rows.- Specified by:
getPartitionExpressionsin classConsistentPartitionWindow- Returns:
- list of partitioning expressions
-
getSorts
Returns the sort fields defining row order within each partition.- Specified by:
getSortsin classConsistentPartitionWindow- Returns:
- list of sort fields
-
withExtension
Copy the current immutable object by setting a present value for the optionalextensionattribute.- Parameters:
value- The value for extension- Returns:
- A modified copy or
thisif not changed
-
withExtension
public final ImmutableConsistentPartitionWindow withExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for theextensionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for extension- Returns:
- A modified copy or
thisif not changed
-
withRemap
Copy the current immutable object by setting a present value for the optionalremapattribute.- Parameters:
value- The value for remap- Returns:
- A modified copy or
thisif not changed
-
withRemap
Copy the current immutable object by setting an optional value for theremapattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for remap- Returns:
- A modified copy or
thisif not changed
-
withCommonExtension
Copy the current immutable object by setting a present value for the optionalcommonExtensionattribute.- Parameters:
value- The value for commonExtension- Returns:
- A modified copy or
thisif not changed
-
withCommonExtension
public final ImmutableConsistentPartitionWindow withCommonExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for thecommonExtensionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for commonExtension- Returns:
- A modified copy or
thisif not changed
-
withHint
Copy the current immutable object by setting a present value for the optionalhintattribute.- Parameters:
value- The value for hint- Returns:
- A modified copy or
thisif not changed
-
withHint
Copy the current immutable object by setting an optional value for thehintattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for hint- Returns:
- A modified copy or
thisif not changed
-
withInput
Copy the current immutable object by setting a value for theinputattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for input- Returns:
- A modified copy or the
thisobject
-
withWindowFunctions
public final ImmutableConsistentPartitionWindow withWindowFunctions(ConsistentPartitionWindow.WindowRelFunctionInvocation... elements) Copy the current immutable object with elements that replace the content ofwindowFunctions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withWindowFunctions
public final ImmutableConsistentPartitionWindow withWindowFunctions(Iterable<? extends ConsistentPartitionWindow.WindowRelFunctionInvocation> elements) Copy the current immutable object with elements that replace the content ofwindowFunctions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of windowFunctions elements to set- Returns:
- A modified copy or
thisif not changed
-
withPartitionExpressions
Copy the current immutable object with elements that replace the content ofpartitionExpressions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPartitionExpressions
public final ImmutableConsistentPartitionWindow withPartitionExpressions(Iterable<? extends Expression> elements) Copy the current immutable object with elements that replace the content ofpartitionExpressions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of partitionExpressions elements to set- Returns:
- A modified copy or
thisif not changed
-
withSorts
Copy the current immutable object with elements that replace the content ofsorts.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSorts
public final ImmutableConsistentPartitionWindow withSorts(Iterable<? extends Expression.SortField> elements) Copy the current immutable object with elements that replace the content ofsorts. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of sorts elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableConsistentPartitionWindowthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,input,windowFunctions,partitionExpressions,sorts. -
toString
Prints the immutable valueConsistentPartitionWindowwith attribute values. -
copyOf
Creates an immutable copy of aConsistentPartitionWindowvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ConsistentPartitionWindow instance
-
builder
Creates a builder forImmutableConsistentPartitionWindow.ImmutableConsistentPartitionWindow.builder() .extension(Optional<io.substrait.extension.AdvancedExtension>) // optionalextension.remap(Optional<io.substrait.relation.Rel.Remap>) // optionalremap.commonExtension(Optional<io.substrait.extension.AdvancedExtension>) // optionalcommonExtension.hint(Optional<io.substrait.hint.Hint>) // optionalhint.input(io.substrait.relation.Rel) // requiredinput.addWindowFunctions|addAllWindowFunctions(io.substrait.relation.ConsistentPartitionWindow.WindowRelFunctionInvocation) //windowFunctionselements .addPartitionExpressions|addAllPartitionExpressions(io.substrait.expression.Expression) //partitionExpressionselements .addSorts|addAllSorts(io.substrait.expression.Expression.SortField) //sortselements .build();- Returns:
- A new ImmutableConsistentPartitionWindow builder
-