Package io.substrait.expression
Class ImmutableExpression.Cast
java.lang.Object
io.substrait.expression.Expression.Cast
io.substrait.expression.ImmutableExpression.Cast
- All Implemented Interfaces:
Expression,FunctionArg
- Enclosing class:
- ImmutableExpression
Immutable implementation of
Expression.Cast.
Use the builder to create immutable instances:
ImmutableExpression.Cast.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 forCast.static ImmutableExpression.CastcopyOf(Expression.Cast instance) Creates an immutable copy of aExpression.Castvalue.booleanThis instance is equal to all instances ofCastthat have equal attribute values.inthashCode()Computes a hash code from attributes:type,input,failureBehavior.input()toString()Prints the immutable valueCastwith attribute values.type()final ImmutableExpression.CastCopy the current immutable object by setting a value for thefailureBehaviorattribute.final ImmutableExpression.CastwithInput(Expression value) Copy the current immutable object by setting a value for theinputattribute.final ImmutableExpression.CastCopy the current immutable object by setting a value for thetypeattribute.Methods inherited from class io.substrait.expression.Expression.Cast
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
-
type
- Specified by:
typein classExpression.Cast- Returns:
- The value of the
typeattribute
-
input
- Specified by:
inputin classExpression.Cast- Returns:
- The value of the
inputattribute
-
failureBehavior
- Specified by:
failureBehaviorin classExpression.Cast- Returns:
- The value of the
failureBehaviorattribute
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy or the
thisobject
-
withInput
Copy the current immutable object by setting a value for theinputattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for input- Returns:
- A modified copy or the
thisobject
-
withFailureBehavior
Copy the current immutable object by setting a value for thefailureBehaviorattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for failureBehavior- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofCastthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,input,failureBehavior. -
toString
Prints the immutable valueCastwith attribute values. -
copyOf
Creates an immutable copy of aExpression.Castvalue. 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 Cast instance
-
builder
Creates a builder forCast.ImmutableExpression.Cast.builder() .type(io.substrait.type.Type) // requiredtype.input(io.substrait.expression.Expression) // requiredinput.failureBehavior(io.substrait.expression.Expression.FailureBehavior) // requiredfailureBehavior.build();- Returns:
- A new Cast builder
-