Package io.substrait.expression
Class ImmutableExpression.StructLiteral.Builder
java.lang.Object
io.substrait.expression.ImmutableExpression.StructLiteral.Builder
- Enclosing class:
- ImmutableExpression.StructLiteral
Builds instances of type
StructLiteral.
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 TypeMethodDescriptionaddAllFields(Iterable<? extends Expression.Literal> elements) Adds elements tofieldslist.addFields(Expression.Literal element) Adds one element tofieldslist.addFields(Expression.Literal... elements) Adds elements tofieldslist.build()Builds a newStructLiteral.fields(Iterable<? extends Expression.Literal> elements) Sets or replaces all elements forfieldslist.from(Expression.Literal instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.Literalinstance.from(Expression.StructLiteral instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.StructLiteralinstance.nullable(boolean nullable) Initializes the value for thenullableattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.substrait.expression.Expression.Literalinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.substrait.expression.Expression.StructLiteralinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
nullable
Initializes the value for thenullableattribute.If not set, this attribute will have a default value as returned by the initializer of
nullable.- Parameters:
nullable- The value for nullable- Returns:
thisbuilder for use in a chained invocation
-
addFields
Adds one element tofieldslist.- Parameters:
element- A fields element- Returns:
thisbuilder for use in a chained invocation
-
addFields
Adds elements tofieldslist.- Parameters:
elements- An array of fields elements- Returns:
thisbuilder for use in a chained invocation
-
fields
public final ImmutableExpression.StructLiteral.Builder fields(Iterable<? extends Expression.Literal> elements) Sets or replaces all elements forfieldslist.- Parameters:
elements- An iterable of fields elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFields
public final ImmutableExpression.StructLiteral.Builder addAllFields(Iterable<? extends Expression.Literal> elements) Adds elements tofieldslist.- Parameters:
elements- An iterable of fields elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newStructLiteral.- Returns:
- An immutable instance of StructLiteral
- Throws:
IllegalStateException- if any required attributes are missing
-