Package io.substrait.type
Class ImmutableType.Func
java.lang.Object
io.substrait.type.Type.Func
io.substrait.type.ImmutableType.Func
- All Implemented Interfaces:
FunctionArg,NullableType,ParameterizedType,TypeExpression,Type
- Enclosing class:
- ImmutableType
Immutable implementation of
Type.Func.
Use the builder to create immutable instances:
ImmutableType.Func.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.substrait.expression.FunctionArg
FunctionArg.FuncArgVisitor<R,C extends VisitationContext, E extends Throwable>, FunctionArg.ProtoFrom Nested classes/interfaces inherited from interface io.substrait.function.ParameterizedType
ParameterizedType.BaseParameterizedType, ParameterizedType.NullableParameterizedType, ParameterizedType.RequiredParameterizedVisitorException, ParameterizedType.StringLiteralNested classes/interfaces inherited from interface io.substrait.type.Type
Type.Binary, Type.Bool, Type.Date, Type.Decimal, Type.FixedBinary, Type.FixedChar, Type.FP32, Type.FP64, Type.Func, Type.I16, Type.I32, Type.I64, Type.I8, Type.IntervalCompound, Type.IntervalDay, Type.IntervalYear, Type.ListType, Type.Map, Type.Parameter, Type.ParameterBooleanValue, Type.ParameterDataType, Type.ParameterEnumValue, Type.ParameterIntegerValue, Type.ParameterNull, Type.ParameterStringValue, Type.PrecisionTime, Type.PrecisionTimestamp, Type.PrecisionTimestampTZ, Type.Str, Type.Struct, Type.Time, Type.Timestamp, Type.TimestampTZ, Type.UserDefined, Type.UUID, Type.VarCharNested classes/interfaces inherited from interface io.substrait.function.TypeExpression
TypeExpression.BaseTypeExpression, TypeExpression.BinaryOperation, TypeExpression.IfOperation, TypeExpression.IntegerLiteral, TypeExpression.NotOperation, TypeExpression.RequiredTypeExpressionVisitorException, TypeExpression.ReturnProgram -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableType.Func.Builderbuilder()Creates a builder forFunc.static ImmutableType.FuncCreates an immutable copy of aType.Funcvalue.booleanThis instance is equal to all instances ofFuncthat have equal attribute values.inthashCode()Computes a hash code from attributes:nullable,parameterTypes,returnType.booleannullable()toString()Prints the immutable valueFuncwith attribute values.final ImmutableType.FuncwithNullable(boolean value) Copy the current immutable object by setting a value for thenullableattribute.final ImmutableType.FuncwithParameterTypes(Type... elements) Copy the current immutable object with elements that replace the content ofparameterTypes.final ImmutableType.FuncwithParameterTypes(Iterable<? extends Type> elements) Copy the current immutable object with elements that replace the content ofparameterTypes.final ImmutableType.FuncwithReturnType(Type value) Copy the current immutable object by setting a value for thereturnTypeattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.substrait.function.ParameterizedType
isWildcardMethods inherited from interface io.substrait.type.Type
accept, equalsIgnoringNullability
-
Method Details
-
nullable
public boolean nullable()- Returns:
- The value of the
nullableattribute
-
parameterTypes
- Specified by:
parameterTypesin classType.Func- Returns:
- The value of the
parameterTypesattribute
-
returnType
- Specified by:
returnTypein classType.Func- Returns:
- The value of the
returnTypeattribute
-
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
-
withParameterTypes
Copy the current immutable object with elements that replace the content ofparameterTypes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withParameterTypes
Copy the current immutable object with elements that replace the content ofparameterTypes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of parameterTypes elements to set- Returns:
- A modified copy or
thisif not changed
-
withReturnType
Copy the current immutable object by setting a value for thereturnTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for returnType- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofFuncthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,parameterTypes,returnType. -
toString
Prints the immutable valueFuncwith attribute values. -
copyOf
Creates an immutable copy of aType.Funcvalue. 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 Func instance
-
builder
Creates a builder forFunc.ImmutableType.Func.builder() .nullable(boolean) // requirednullable.addParameterTypes|addAllParameterTypes(io.substrait.type.Type) //parameterTypeselements .returnType(io.substrait.type.Type) // requiredreturnType.build();- Returns:
- A new Func builder
-