Package io.substrait.expression
Class ImmutableExpression.IntervalCompoundLiteral.Builder
java.lang.Object
io.substrait.expression.ImmutableExpression.IntervalCompoundLiteral.Builder
- Enclosing class:
- ImmutableExpression.IntervalCompoundLiteral
Builds instances of type
IntervalCompoundLiteral.
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 TypeMethodDescriptionbuild()Builds a newIntervalCompoundLiteral.days(int days) Initializes the value for thedaysattribute.from(Expression.IntervalCompoundLiteral instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.IntervalCompoundLiteralinstance.from(Expression.Literal instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.Literalinstance.months(int months) Initializes the value for themonthsattribute.nullable(boolean nullable) Initializes the value for thenullableattribute.precision(int precision) Initializes the value for theprecisionattribute.seconds(int seconds) Initializes the value for thesecondsattribute.subseconds(long subseconds) Initializes the value for thesubsecondsattribute.years(int years) Initializes the value for theyearsattribute.
-
Method Details
-
from
public final ImmutableExpression.IntervalCompoundLiteral.Builder from(Expression.IntervalCompoundLiteral instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.IntervalCompoundLiteralinstance.- 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.Literalinstance.- 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
-
years
Initializes the value for theyearsattribute.- Parameters:
years- The value for years- Returns:
thisbuilder for use in a chained invocation
-
months
Initializes the value for themonthsattribute.- Parameters:
months- The value for months- Returns:
thisbuilder for use in a chained invocation
-
days
Initializes the value for thedaysattribute.- Parameters:
days- The value for days- Returns:
thisbuilder for use in a chained invocation
-
seconds
Initializes the value for thesecondsattribute.- Parameters:
seconds- The value for seconds- Returns:
thisbuilder for use in a chained invocation
-
subseconds
Initializes the value for thesubsecondsattribute.- Parameters:
subseconds- The value for subseconds- Returns:
thisbuilder for use in a chained invocation
-
precision
Initializes the value for theprecisionattribute.- Parameters:
precision- The value for precision- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newIntervalCompoundLiteral.- Returns:
- An immutable instance of IntervalCompoundLiteral
- Throws:
IllegalStateException- if any required attributes are missing
-