Package io.substrait.expression
Class ImmutableExpression.IntervalCompoundLiteral
java.lang.Object
io.substrait.expression.Expression.IntervalCompoundLiteral
io.substrait.expression.ImmutableExpression.IntervalCompoundLiteral
- All Implemented Interfaces:
Expression,Expression.Literal,FunctionArg
- Enclosing class:
- ImmutableExpression
public static final class ImmutableExpression.IntervalCompoundLiteral
extends Expression.IntervalCompoundLiteral
Immutable implementation of
Expression.IntervalCompoundLiteral.
Use the builder to create immutable instances:
ImmutableExpression.IntervalCompoundLiteral.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeIntervalCompoundLiteral.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 forIntervalCompoundLiteral.copyOf(Expression.IntervalCompoundLiteral instance) Creates an immutable copy of aExpression.IntervalCompoundLiteralvalue.intdays()booleanThis instance is equal to all instances ofIntervalCompoundLiteralthat have equal attribute values.inthashCode()Computes a hash code from attributes:nullable,years,months,days,seconds,subseconds,precision.intmonths()booleannullable()intintseconds()longtoString()Prints the immutable valueIntervalCompoundLiteralwith attribute values.withDays(int value) Copy the current immutable object by setting a value for thedaysattribute.withMonths(int value) Copy the current immutable object by setting a value for themonthsattribute.withNullable(boolean value) Copy the current immutable object by setting a value for thenullableattribute.withPrecision(int value) Copy the current immutable object by setting a value for theprecisionattribute.withSeconds(int value) Copy the current immutable object by setting a value for thesecondsattribute.withSubseconds(long value) Copy the current immutable object by setting a value for thesubsecondsattribute.withYears(int value) Copy the current immutable object by setting a value for theyearsattribute.intyears()Methods inherited from class io.substrait.expression.Expression.IntervalCompoundLiteral
accept, 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
-
nullable
public boolean nullable()- Returns:
- The value of the
nullableattribute
-
years
public int years()- Specified by:
yearsin classExpression.IntervalCompoundLiteral- Returns:
- The value of the
yearsattribute
-
months
public int months()- Specified by:
monthsin classExpression.IntervalCompoundLiteral- Returns:
- The value of the
monthsattribute
-
days
public int days()- Specified by:
daysin classExpression.IntervalCompoundLiteral- Returns:
- The value of the
daysattribute
-
seconds
public int seconds()- Specified by:
secondsin classExpression.IntervalCompoundLiteral- Returns:
- The value of the
secondsattribute
-
subseconds
public long subseconds()- Specified by:
subsecondsin classExpression.IntervalCompoundLiteral- Returns:
- The value of the
subsecondsattribute
-
precision
public int precision()- Specified by:
precisionin classExpression.IntervalCompoundLiteral- Returns:
- The value of the
precisionattribute
-
withNullable
Copy the current immutable object by setting a value for thenullableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for nullable- Returns:
- A modified copy or the
thisobject
-
withYears
Copy the current immutable object by setting a value for theyearsattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for years- Returns:
- A modified copy or the
thisobject
-
withMonths
Copy the current immutable object by setting a value for themonthsattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for months- Returns:
- A modified copy or the
thisobject
-
withDays
Copy the current immutable object by setting a value for thedaysattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for days- Returns:
- A modified copy or the
thisobject
-
withSeconds
Copy the current immutable object by setting a value for thesecondsattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for seconds- Returns:
- A modified copy or the
thisobject
-
withSubseconds
Copy the current immutable object by setting a value for thesubsecondsattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for subseconds- Returns:
- A modified copy or the
thisobject
-
withPrecision
Copy the current immutable object by setting a value for theprecisionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for precision- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofIntervalCompoundLiteralthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,years,months,days,seconds,subseconds,precision. -
toString
Prints the immutable valueIntervalCompoundLiteralwith attribute values. -
copyOf
public static ImmutableExpression.IntervalCompoundLiteral copyOf(Expression.IntervalCompoundLiteral instance) Creates an immutable copy of aExpression.IntervalCompoundLiteralvalue. 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 IntervalCompoundLiteral instance
-
builder
Creates a builder forIntervalCompoundLiteral.ImmutableExpression.IntervalCompoundLiteral.builder() .nullable(boolean) // optionalnullable.years(int) // requiredyears.months(int) // requiredmonths.days(int) // requireddays.seconds(int) // requiredseconds.subseconds(long) // requiredsubseconds.precision(int) // requiredprecision.build();- Returns:
- A new IntervalCompoundLiteral builder
-