Package io.substrait.relation
Class ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder
java.lang.Object
io.substrait.relation.ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder
- Enclosing class:
- ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation
public static final class ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder
extends Object
Builds instances of type
WindowRelFunctionInvocation.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllArguments(Iterable<? extends FunctionArg> elements) Adds elements toargumentslist.addAllOptions(Iterable<? extends FunctionOption> elements) Adds elements tooptionslist.addArguments(FunctionArg element) Adds one element toargumentslist.addArguments(FunctionArg... elements) Adds elements toargumentslist.addOptions(FunctionOption element) Adds one element tooptionslist.addOptions(FunctionOption... elements) Adds elements tooptionslist.aggregationPhase(Expression.AggregationPhase aggregationPhase) Initializes the value for theaggregationPhaseattribute.arguments(Iterable<? extends FunctionArg> elements) Sets or replaces all elements forargumentslist.boundsType(Expression.WindowBoundsType boundsType) Initializes the value for theboundsTypeattribute.build()Builds a newWindowRelFunctionInvocation.declaration(SimpleExtension.WindowFunctionVariant declaration) Initializes the value for thedeclarationattribute.Fill a builder with attribute values from the providedWindowRelFunctionInvocationinstance.invocation(Expression.AggregationInvocation invocation) Initializes the value for theinvocationattribute.lowerBound(WindowBound lowerBound) Initializes the value for thelowerBoundattribute.options(Iterable<? extends FunctionOption> elements) Sets or replaces all elements foroptionslist.outputType(Type outputType) Initializes the value for theoutputTypeattribute.upperBound(WindowBound upperBound) Initializes the value for theupperBoundattribute.
-
Method Details
-
from
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder from(ConsistentPartitionWindow.WindowRelFunctionInvocation instance) Fill a builder with attribute values from the providedWindowRelFunctionInvocationinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
declaration
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder declaration(SimpleExtension.WindowFunctionVariant declaration) Initializes the value for thedeclarationattribute.- Parameters:
declaration- The value for declaration- Returns:
thisbuilder for use in a chained invocation
-
addArguments
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder addArguments(FunctionArg element) Adds one element toargumentslist.- Parameters:
element- A arguments element- Returns:
thisbuilder for use in a chained invocation
-
addArguments
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder addArguments(FunctionArg... elements) Adds elements toargumentslist.- Parameters:
elements- An array of arguments elements- Returns:
thisbuilder for use in a chained invocation
-
arguments
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder arguments(Iterable<? extends FunctionArg> elements) Sets or replaces all elements forargumentslist.- Parameters:
elements- An iterable of arguments elements- Returns:
thisbuilder for use in a chained invocation
-
addAllArguments
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder addAllArguments(Iterable<? extends FunctionArg> elements) Adds elements toargumentslist.- Parameters:
elements- An iterable of arguments elements- Returns:
thisbuilder for use in a chained invocation
-
addOptions
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder addOptions(FunctionOption element) Adds one element tooptionslist.- Parameters:
element- A options element- Returns:
thisbuilder for use in a chained invocation
-
addOptions
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder addOptions(FunctionOption... elements) Adds elements tooptionslist.- Parameters:
elements- An array of options elements- Returns:
thisbuilder for use in a chained invocation
-
options
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder options(Iterable<? extends FunctionOption> elements) Sets or replaces all elements foroptionslist.- Parameters:
elements- An iterable of options elements- Returns:
thisbuilder for use in a chained invocation
-
addAllOptions
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder addAllOptions(Iterable<? extends FunctionOption> elements) Adds elements tooptionslist.- Parameters:
elements- An iterable of options elements- Returns:
thisbuilder for use in a chained invocation
-
outputType
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder outputType(Type outputType) Initializes the value for theoutputTypeattribute.- Parameters:
outputType- The value for outputType- Returns:
thisbuilder for use in a chained invocation
-
aggregationPhase
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder aggregationPhase(Expression.AggregationPhase aggregationPhase) Initializes the value for theaggregationPhaseattribute.- Parameters:
aggregationPhase- The value for aggregationPhase- Returns:
thisbuilder for use in a chained invocation
-
invocation
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder invocation(Expression.AggregationInvocation invocation) Initializes the value for theinvocationattribute.- Parameters:
invocation- The value for invocation- Returns:
thisbuilder for use in a chained invocation
-
lowerBound
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder lowerBound(WindowBound lowerBound) Initializes the value for thelowerBoundattribute.- Parameters:
lowerBound- The value for lowerBound- Returns:
thisbuilder for use in a chained invocation
-
upperBound
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder upperBound(WindowBound upperBound) Initializes the value for theupperBoundattribute.- Parameters:
upperBound- The value for upperBound- Returns:
thisbuilder for use in a chained invocation
-
boundsType
public final ImmutableConsistentPartitionWindow.WindowRelFunctionInvocation.Builder boundsType(Expression.WindowBoundsType boundsType) Initializes the value for theboundsTypeattribute.- Parameters:
boundsType- The value for boundsType- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWindowRelFunctionInvocation.- Returns:
- An immutable instance of WindowRelFunctionInvocation
- Throws:
IllegalStateException- if any required attributes are missing
-