Package io.substrait.expression
Class ImmutableExpression.WindowFunctionInvocation
java.lang.Object
io.substrait.expression.Expression.WindowFunctionInvocation
io.substrait.expression.ImmutableExpression.WindowFunctionInvocation
- All Implemented Interfaces:
Expression,FunctionArg
- Enclosing class:
- ImmutableExpression
public static final class ImmutableExpression.WindowFunctionInvocation
extends Expression.WindowFunctionInvocation
Immutable implementation of
Expression.WindowFunctionInvocation.
Use the builder to create immutable instances:
ImmutableExpression.WindowFunctionInvocation.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeWindowFunctionInvocation.Nested classes/interfaces inherited from interface io.substrait.expression.Expression
Expression.AggregationInvocation, Expression.AggregationPhase, Expression.BinaryLiteral, Expression.BoolLiteral, Expression.Cast, Expression.DateLiteral, Expression.DecimalLiteral, Expression.EmptyListLiteral, Expression.EmptyMapLiteral, Expression.FailureBehavior, Expression.FixedBinaryLiteral, Expression.FixedCharLiteral, Expression.FP32Literal, Expression.FP64Literal, Expression.I16Literal, Expression.I32Literal, Expression.I64Literal, Expression.I8Literal, Expression.IfClause, Expression.IfThen, Expression.InPredicate, Expression.IntervalCompoundLiteral, Expression.IntervalDayLiteral, Expression.IntervalYearLiteral, Expression.Lambda, Expression.ListLiteral, Expression.Literal, Expression.MapLiteral, Expression.MultiOrList, Expression.MultiOrListRecord, Expression.Nested, Expression.NestedList, Expression.NestedStruct, Expression.NullLiteral, Expression.PrecisionTimeLiteral, Expression.PrecisionTimestampLiteral, Expression.PrecisionTimestampTZLiteral, Expression.PredicateOp, Expression.ScalarFunctionInvocation, Expression.ScalarSubquery, Expression.SetPredicate, Expression.SingleOrList, Expression.SortDirection, Expression.SortField, Expression.StrLiteral, Expression.StructLiteral, Expression.Subquery, Expression.Switch, Expression.SwitchClause, Expression.TimeLiteral, Expression.TimestampLiteral, Expression.TimestampTZLiteral, Expression.UserDefinedAnyLiteral, Expression.UserDefinedLiteral, Expression.UserDefinedStructLiteral, Expression.UUIDLiteral, Expression.VarCharLiteral, Expression.WindowBoundsType, Expression.WindowFunctionInvocationNested classes/interfaces inherited from interface io.substrait.expression.FunctionArg
FunctionArg.FuncArgVisitor<R,C extends VisitationContext, E extends Throwable>, FunctionArg.ProtoFrom -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forWindowFunctionInvocation.copyOf(Expression.WindowFunctionInvocation instance) Creates an immutable copy of aExpression.WindowFunctionInvocationvalue.booleanThis instance is equal to all instances ofWindowFunctionInvocationthat have equal attribute values.inthashCode()Computes a hash code from attributes:declaration,arguments,options,aggregationPhase,partitionBy,sort,boundsType,lowerBound,upperBound,outputType,invocation.options()sort()toString()Prints the immutable valueWindowFunctionInvocationwith attribute values.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.withPartitionBy(Expression... elements) Copy the current immutable object with elements that replace the content ofpartitionBy.withPartitionBy(Iterable<? extends Expression> elements) Copy the current immutable object with elements that replace the content ofpartitionBy.withSort(Expression.SortField... elements) Copy the current immutable object with elements that replace the content ofsort.withSort(Iterable<? extends Expression.SortField> elements) Copy the current immutable object with elements that replace the content ofsort.withUpperBound(WindowBound value) Copy the current immutable object by setting a value for theupperBoundattribute.Methods inherited from class io.substrait.expression.Expression.WindowFunctionInvocation
accept, check, getTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.substrait.expression.Expression
accept
-
Method Details
-
declaration
- Specified by:
declarationin classExpression.WindowFunctionInvocation- Returns:
- The value of the
declarationattribute
-
arguments
- Specified by:
argumentsin classExpression.WindowFunctionInvocation- Returns:
- The value of the
argumentsattribute
-
options
- Specified by:
optionsin classExpression.WindowFunctionInvocation- Returns:
- The value of the
optionsattribute
-
aggregationPhase
- Specified by:
aggregationPhasein classExpression.WindowFunctionInvocation- Returns:
- The value of the
aggregationPhaseattribute
-
partitionBy
- Specified by:
partitionByin classExpression.WindowFunctionInvocation- Returns:
- The value of the
partitionByattribute
-
sort
- Specified by:
sortin classExpression.WindowFunctionInvocation- Returns:
- The value of the
sortattribute
-
boundsType
- Specified by:
boundsTypein classExpression.WindowFunctionInvocation- Returns:
- The value of the
boundsTypeattribute
-
lowerBound
- Specified by:
lowerBoundin classExpression.WindowFunctionInvocation- Returns:
- The value of the
lowerBoundattribute
-
upperBound
- Specified by:
upperBoundin classExpression.WindowFunctionInvocation- Returns:
- The value of the
upperBoundattribute
-
outputType
- Specified by:
outputTypein classExpression.WindowFunctionInvocation- Returns:
- The value of the
outputTypeattribute
-
invocation
- Specified by:
invocationin classExpression.WindowFunctionInvocation- Returns:
- The value of the
invocationattribute
-
withDeclaration
public final ImmutableExpression.WindowFunctionInvocation 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
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 ImmutableExpression.WindowFunctionInvocation 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
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 ImmutableExpression.WindowFunctionInvocation 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
-
withAggregationPhase
public final ImmutableExpression.WindowFunctionInvocation 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
-
withPartitionBy
Copy the current immutable object with elements that replace the content ofpartitionBy.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPartitionBy
public final ImmutableExpression.WindowFunctionInvocation withPartitionBy(Iterable<? extends Expression> elements) Copy the current immutable object with elements that replace the content ofpartitionBy. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of partitionBy elements to set- Returns:
- A modified copy or
thisif not changed
-
withSort
public final ImmutableExpression.WindowFunctionInvocation withSort(Expression.SortField... elements) Copy the current immutable object with elements that replace the content ofsort.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSort
public final ImmutableExpression.WindowFunctionInvocation withSort(Iterable<? extends Expression.SortField> elements) Copy the current immutable object with elements that replace the content ofsort. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of sort elements to set- Returns:
- A modified copy or
thisif not changed
-
withBoundsType
public final ImmutableExpression.WindowFunctionInvocation 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
-
withLowerBound
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
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
-
withOutputType
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
-
withInvocation
public final ImmutableExpression.WindowFunctionInvocation 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
-
equals
This instance is equal to all instances ofWindowFunctionInvocationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:declaration,arguments,options,aggregationPhase,partitionBy,sort,boundsType,lowerBound,upperBound,outputType,invocation. -
toString
Prints the immutable valueWindowFunctionInvocationwith attribute values. -
copyOf
public static ImmutableExpression.WindowFunctionInvocation copyOf(Expression.WindowFunctionInvocation instance) Creates an immutable copy of aExpression.WindowFunctionInvocationvalue. 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 WindowFunctionInvocation instance
-
builder
Creates a builder forWindowFunctionInvocation.ImmutableExpression.WindowFunctionInvocation.builder() .declaration(io.substrait.extension.SimpleExtension.WindowFunctionVariant) // requireddeclaration.addArguments|addAllArguments(io.substrait.expression.FunctionArg) //argumentselements .addOptions|addAllOptions(io.substrait.expression.FunctionOption) //optionselements .aggregationPhase(io.substrait.expression.Expression.AggregationPhase) // requiredaggregationPhase.addPartitionBy|addAllPartitionBy(io.substrait.expression.Expression) //partitionByelements .addSort|addAllSort(io.substrait.expression.Expression.SortField) //sortelements .boundsType(io.substrait.expression.Expression.WindowBoundsType) // requiredboundsType.lowerBound(io.substrait.expression.WindowBound) // requiredlowerBound.upperBound(io.substrait.expression.WindowBound) // requiredupperBound.outputType(io.substrait.type.Type) // requiredoutputType.invocation(io.substrait.expression.Expression.AggregationInvocation) // requiredinvocation.build();- Returns:
- A new WindowFunctionInvocation builder
-