Package io.substrait.relation
Class ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation
java.lang.Object
io.substrait.relation.ConsistentPartitionWindow.WindowRelFunctionInvocation
io.substrait.relation.ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation
- Enclosing class:
- ImmutableConsistentPartitionWindow
public static final class ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation
extends ConsistentPartitionWindow.WindowRelFunctionInvocation
Immutable implementation of
ConsistentPartitionWindow.WindowRelFunctionInvocation.
Use the builder to create immutable instances:
ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeWindowRelFunctionInvocation. -
Method Summary
Modifier and TypeMethodDescriptionReturns the aggregation phase (e.g., initial, intermediate, final).Returns the ordered list of function arguments.Returns the bounds type (e.g., ROWS or RANGE).builder()Creates a builder forWindowRelFunctionInvocation.Creates an immutable copy of aConsistentPartitionWindow.WindowRelFunctionInvocationvalue.Returns the window function variant declaration.booleanThis instance is equal to all instances ofWindowRelFunctionInvocationthat have equal attribute values.inthashCode()Computes a hash code from attributes:declaration,arguments,options,outputType,aggregationPhase,invocation,lowerBound,upperBound,boundsType.Returns the aggregation invocation semantics (e.g., aggregate, merge).Returns the inclusive lower bound of the window frame.options()Returns the options applied to the function invocation.Returns the type produced by this invocation.toString()Prints the immutable valueWindowRelFunctionInvocationwith attribute values.Returns the inclusive upper bound of the window frame.Copy the current immutable object by setting a value for theaggregationPhaseattribute.withArguments(FunctionArg... elements) Copy the current immutable object with elements that replace the content ofarguments.withArguments(Iterable<? extends FunctionArg> elements) Copy the current immutable object with elements that replace the content ofarguments.Copy the current immutable object by setting a value for theboundsTypeattribute.Copy the current immutable object by setting a value for thedeclarationattribute.Copy the current immutable object by setting a value for theinvocationattribute.withLowerBound(WindowBound value) Copy the current immutable object by setting a value for thelowerBoundattribute.withOptions(FunctionOption... elements) Copy the current immutable object with elements that replace the content ofoptions.withOptions(Iterable<? extends FunctionOption> elements) Copy the current immutable object with elements that replace the content ofoptions.withOutputType(Type value) Copy the current immutable object by setting a value for theoutputTypeattribute.withUpperBound(WindowBound value) Copy the current immutable object by setting a value for theupperBoundattribute.
-
Method Details
-
declaration
Returns the window function variant declaration.- Specified by:
declarationin classConsistentPartitionWindow.WindowRelFunctionInvocation- Returns:
- the function variant declaration
-
arguments
Returns the ordered list of function arguments.- Specified by:
argumentsin classConsistentPartitionWindow.WindowRelFunctionInvocation- Returns:
- list of function arguments
-
options
Returns the options applied to the function invocation.- Specified by:
optionsin classConsistentPartitionWindow.WindowRelFunctionInvocation- Returns:
- list of function options
-
outputType
Returns the type produced by this invocation.- Specified by:
outputTypein classConsistentPartitionWindow.WindowRelFunctionInvocation- Returns:
- output type of the window function
-
aggregationPhase
Returns the aggregation phase (e.g., initial, intermediate, final).- Specified by:
aggregationPhasein classConsistentPartitionWindow.WindowRelFunctionInvocation- Returns:
- aggregation phase
-
invocation
Returns the aggregation invocation semantics (e.g., aggregate, merge).- Specified by:
invocationin classConsistentPartitionWindow.WindowRelFunctionInvocation- Returns:
- aggregation invocation
-
lowerBound
Returns the inclusive lower bound of the window frame.- Specified by:
lowerBoundin classConsistentPartitionWindow.WindowRelFunctionInvocation- Returns:
- lower window bound
-
upperBound
Returns the inclusive upper bound of the window frame.- Specified by:
upperBoundin classConsistentPartitionWindow.WindowRelFunctionInvocation- Returns:
- upper window bound
-
boundsType
Returns the bounds type (e.g., ROWS or RANGE).- Specified by:
boundsTypein classConsistentPartitionWindow.WindowRelFunctionInvocation- Returns:
- window bounds type
-
withDeclaration
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation withDeclaration(SimpleExtension.WindowFunctionVariant value) Copy the current immutable object by setting a value for thedeclarationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for declaration- Returns:
- A modified copy or the
thisobject
-
withArguments
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation withArguments(FunctionArg... elements) Copy the current immutable object with elements that replace the content ofarguments.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withArguments
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation withArguments(Iterable<? extends FunctionArg> elements) Copy the current immutable object with elements that replace the content ofarguments. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of arguments elements to set- Returns:
- A modified copy or
thisif not changed
-
withOptions
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation withOptions(FunctionOption... elements) Copy the current immutable object with elements that replace the content ofoptions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOptions
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation withOptions(Iterable<? extends FunctionOption> elements) Copy the current immutable object with elements that replace the content ofoptions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of options elements to set- Returns:
- A modified copy or
thisif not changed
-
withOutputType
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation withOutputType(Type value) Copy the current immutable object by setting a value for theoutputTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for outputType- Returns:
- A modified copy or the
thisobject
-
withAggregationPhase
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation withAggregationPhase(Expression.AggregationPhase value) Copy the current immutable object by setting a value for theaggregationPhaseattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for aggregationPhase- Returns:
- A modified copy or the
thisobject
-
withInvocation
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation withInvocation(Expression.AggregationInvocation value) Copy the current immutable object by setting a value for theinvocationattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for invocation- Returns:
- A modified copy or the
thisobject
-
withLowerBound
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation withLowerBound(WindowBound value) Copy the current immutable object by setting a value for thelowerBoundattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lowerBound- Returns:
- A modified copy or the
thisobject
-
withUpperBound
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation withUpperBound(WindowBound value) Copy the current immutable object by setting a value for theupperBoundattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for upperBound- Returns:
- A modified copy or the
thisobject
-
withBoundsType
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation withBoundsType(Expression.WindowBoundsType value) Copy the current immutable object by setting a value for theboundsTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for boundsType- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofWindowRelFunctionInvocationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:declaration,arguments,options,outputType,aggregationPhase,invocation,lowerBound,upperBound,boundsType. -
toString
Prints the immutable valueWindowRelFunctionInvocationwith attribute values. -
copyOf
public static ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation copyOf(ConsistentPartitionWindow.WindowRelFunctionInvocation instance) Creates an immutable copy of aConsistentPartitionWindow.WindowRelFunctionInvocationvalue. 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 WindowRelFunctionInvocation instance
-
builder
Creates a builder forWindowRelFunctionInvocation.ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.builder() .declaration(io.substrait.extension.SimpleExtension.WindowFunctionVariant) // requireddeclaration.addArguments|addAllArguments(io.substrait.expression.FunctionArg) //argumentselements .addOptions|addAllOptions(io.substrait.expression.FunctionOption) //optionselements .outputType(io.substrait.type.Type) // requiredoutputType.aggregationPhase(io.substrait.expression.Expression.AggregationPhase) // requiredaggregationPhase.invocation(io.substrait.expression.Expression.AggregationInvocation) // requiredinvocation.lowerBound(io.substrait.expression.WindowBound) // requiredlowerBound.upperBound(io.substrait.expression.WindowBound) // requiredupperBound.boundsType(io.substrait.expression.Expression.WindowBoundsType) // requiredboundsType.build();- Returns:
- A new WindowRelFunctionInvocation builder
-