Package io.substrait.expression
Class ImmutableExpression.ScalarFunctionInvocation
java.lang.Object
io.substrait.expression.Expression.ScalarFunctionInvocation
io.substrait.expression.ImmutableExpression.ScalarFunctionInvocation
- All Implemented Interfaces:
Expression,FunctionArg
- Enclosing class:
- ImmutableExpression
public static final class ImmutableExpression.ScalarFunctionInvocation
extends Expression.ScalarFunctionInvocation
Immutable implementation of
Expression.ScalarFunctionInvocation.
Use the builder to create immutable instances:
ImmutableExpression.ScalarFunctionInvocation.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeScalarFunctionInvocation.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 forScalarFunctionInvocation.copyOf(Expression.ScalarFunctionInvocation instance) Creates an immutable copy of aExpression.ScalarFunctionInvocationvalue.booleanThis instance is equal to all instances ofScalarFunctionInvocationthat have equal attribute values.inthashCode()Computes a hash code from attributes:declaration,arguments,options,outputType.options()toString()Prints the immutable valueScalarFunctionInvocationwith attribute values.withArguments(FunctionArg... elements) Copy the current immutable object with elements that replace the content ofarguments.withArguments(Iterable<? extends FunctionArg> elements) Copy the current immutable object with elements that replace the content ofarguments.Copy the current immutable object by setting a value for thedeclarationattribute.withOptions(FunctionOption... elements) Copy the current immutable object with elements that replace the content ofoptions.withOptions(Iterable<? extends FunctionOption> elements) Copy the current immutable object with elements that replace the content ofoptions.withOutputType(Type value) Copy the current immutable object by setting a value for theoutputTypeattribute.Methods inherited from class io.substrait.expression.Expression.ScalarFunctionInvocation
accept, check, 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
-
declaration
- Specified by:
declarationin classExpression.ScalarFunctionInvocation- Returns:
- The value of the
declarationattribute
-
arguments
- Specified by:
argumentsin classExpression.ScalarFunctionInvocation- Returns:
- The value of the
argumentsattribute
-
options
- Specified by:
optionsin classExpression.ScalarFunctionInvocation- Returns:
- The value of the
optionsattribute
-
outputType
- Specified by:
outputTypein classExpression.ScalarFunctionInvocation- Returns:
- The value of the
outputTypeattribute
-
withDeclaration
public final ImmutableExpression.ScalarFunctionInvocation withDeclaration(SimpleExtension.ScalarFunctionVariant value) Copy the current immutable object by setting a value for thedeclarationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for declaration- Returns:
- A modified copy or the
thisobject
-
withArguments
Copy the current immutable object with elements that replace the content ofarguments.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withArguments
public final ImmutableExpression.ScalarFunctionInvocation withArguments(Iterable<? extends FunctionArg> elements) Copy the current immutable object with elements that replace the content ofarguments. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of arguments elements to set- Returns:
- A modified copy or
thisif not changed
-
withOptions
Copy the current immutable object with elements that replace the content ofoptions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOptions
public final ImmutableExpression.ScalarFunctionInvocation withOptions(Iterable<? extends FunctionOption> elements) Copy the current immutable object with elements that replace the content ofoptions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of options elements to set- Returns:
- A modified copy or
thisif not changed
-
withOutputType
Copy the current immutable object by setting a value for theoutputTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for outputType- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofScalarFunctionInvocationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:declaration,arguments,options,outputType. -
toString
Prints the immutable valueScalarFunctionInvocationwith attribute values. -
copyOf
public static ImmutableExpression.ScalarFunctionInvocation copyOf(Expression.ScalarFunctionInvocation instance) Creates an immutable copy of aExpression.ScalarFunctionInvocationvalue. 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 ScalarFunctionInvocation instance
-
builder
Creates a builder forScalarFunctionInvocation.ImmutableExpression.ScalarFunctionInvocation.builder() .declaration(io.substrait.extension.SimpleExtension.ScalarFunctionVariant) // requireddeclaration.addArguments|addAllArguments(io.substrait.expression.FunctionArg) //argumentselements .addOptions|addAllOptions(io.substrait.expression.FunctionOption) //optionselements .outputType(io.substrait.type.Type) // requiredoutputType.build();- Returns:
- A new ScalarFunctionInvocation builder
-