Package io.substrait.expression
Class ImmutableExpression.DecimalLiteral
java.lang.Object
io.substrait.expression.Expression.DecimalLiteral
io.substrait.expression.ImmutableExpression.DecimalLiteral
- All Implemented Interfaces:
Expression,Expression.Literal,FunctionArg
- Enclosing class:
- ImmutableExpression
Immutable implementation of
Expression.DecimalLiteral.
Use the builder to create immutable instances:
ImmutableExpression.DecimalLiteral.builder().
-
Nested Class Summary
Nested ClassesNested 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 forDecimalLiteral.copyOf(Expression.DecimalLiteral instance) Creates an immutable copy of aExpression.DecimalLiteralvalue.booleanThis instance is equal to all instances ofDecimalLiteralthat have equal attribute values.inthashCode()Computes a hash code from attributes:nullable,value,precision,scale.booleannullable()intintscale()toString()Prints the immutable valueDecimalLiteralwith attribute values.com.google.protobuf.ByteStringvalue()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.withScale(int value) Copy the current immutable object by setting a value for thescaleattribute.withValue(com.google.protobuf.ByteString value) Copy the current immutable object by setting a value for thevalueattribute.Methods inherited from class io.substrait.expression.Expression.DecimalLiteral
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
-
value
public com.google.protobuf.ByteString value()- Specified by:
valuein classExpression.DecimalLiteral- Returns:
- The value of the
valueattribute
-
precision
public int precision()- Specified by:
precisionin classExpression.DecimalLiteral- Returns:
- The value of the
precisionattribute
-
scale
public int scale()- Specified by:
scalein classExpression.DecimalLiteral- Returns:
- The value of the
scaleattribute
-
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
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- 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
-
withScale
Copy the current immutable object by setting a value for thescaleattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for scale- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofDecimalLiteralthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,value,precision,scale. -
toString
Prints the immutable valueDecimalLiteralwith attribute values. -
copyOf
Creates an immutable copy of aExpression.DecimalLiteralvalue. 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 DecimalLiteral instance
-
builder
Creates a builder forDecimalLiteral.ImmutableExpression.DecimalLiteral.builder() .nullable(boolean) // optionalnullable.value(com.google.protobuf.ByteString) // requiredvalue.precision(int) // requiredprecision.scale(int) // requiredscale.build();- Returns:
- A new DecimalLiteral builder
-