Package io.substrait.expression
Class ImmutableExpression.UserDefinedStructLiteral
java.lang.Object
io.substrait.expression.Expression.UserDefinedStructLiteral
io.substrait.expression.ImmutableExpression.UserDefinedStructLiteral
- All Implemented Interfaces:
Expression,Expression.Literal,Expression.UserDefinedLiteral,FunctionArg
- Enclosing class:
- ImmutableExpression
public static final class ImmutableExpression.UserDefinedStructLiteral
extends Expression.UserDefinedStructLiteral
Immutable implementation of
Expression.UserDefinedStructLiteral.
Use the builder to create immutable instances:
ImmutableExpression.UserDefinedStructLiteral.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeUserDefinedStructLiteral.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 forUserDefinedStructLiteral.copyOf(Expression.UserDefinedStructLiteral instance) Creates an immutable copy of aExpression.UserDefinedStructLiteralvalue.booleanThis instance is equal to all instances ofUserDefinedStructLiteralthat have equal attribute values.fields()inthashCode()Computes a hash code from attributes:nullable,urn,name,typeParameters,fields.name()booleannullable()toString()Prints the immutable valueUserDefinedStructLiteralwith attribute values.urn()withFields(Expression.Literal... elements) Copy the current immutable object with elements that replace the content offields.withFields(Iterable<? extends Expression.Literal> elements) Copy the current immutable object with elements that replace the content offields.Copy the current immutable object by setting a value for thenameattribute.withNullable(boolean value) Copy the current immutable object by setting a value for thenullableattribute.withTypeParameters(Type.Parameter... elements) Copy the current immutable object with elements that replace the content oftypeParameters.withTypeParameters(Iterable<? extends Type.Parameter> elements) Copy the current immutable object with elements that replace the content oftypeParameters.Copy the current immutable object by setting a value for theurnattribute.Methods inherited from class io.substrait.expression.Expression.UserDefinedStructLiteral
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
-
urn
- Specified by:
urnin interfaceExpression.UserDefinedLiteral- Specified by:
urnin classExpression.UserDefinedStructLiteral- Returns:
- The value of the
urnattribute
-
name
- Specified by:
namein interfaceExpression.UserDefinedLiteral- Specified by:
namein classExpression.UserDefinedStructLiteral- Returns:
- The value of the
nameattribute
-
typeParameters
- Specified by:
typeParametersin interfaceExpression.UserDefinedLiteral- Specified by:
typeParametersin classExpression.UserDefinedStructLiteral- Returns:
- The value of the
typeParametersattribute
-
fields
- Specified by:
fieldsin classExpression.UserDefinedStructLiteral- Returns:
- The value of the
fieldsattribute
-
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
-
withUrn
Copy the current immutable object by setting a value for theurnattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for urn- Returns:
- A modified copy or the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy or the
thisobject
-
withTypeParameters
public final ImmutableExpression.UserDefinedStructLiteral withTypeParameters(Type.Parameter... elements) Copy the current immutable object with elements that replace the content oftypeParameters.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTypeParameters
public final ImmutableExpression.UserDefinedStructLiteral withTypeParameters(Iterable<? extends Type.Parameter> elements) Copy the current immutable object with elements that replace the content oftypeParameters. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of typeParameters elements to set- Returns:
- A modified copy or
thisif not changed
-
withFields
public final ImmutableExpression.UserDefinedStructLiteral withFields(Expression.Literal... elements) Copy the current immutable object with elements that replace the content offields.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFields
public final ImmutableExpression.UserDefinedStructLiteral withFields(Iterable<? extends Expression.Literal> elements) Copy the current immutable object with elements that replace the content offields. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of fields elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofUserDefinedStructLiteralthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,urn,name,typeParameters,fields. -
toString
Prints the immutable valueUserDefinedStructLiteralwith attribute values. -
copyOf
public static ImmutableExpression.UserDefinedStructLiteral copyOf(Expression.UserDefinedStructLiteral instance) Creates an immutable copy of aExpression.UserDefinedStructLiteralvalue. 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 UserDefinedStructLiteral instance
-
builder
Creates a builder forUserDefinedStructLiteral.ImmutableExpression.UserDefinedStructLiteral.builder() .nullable(boolean) // optionalnullable.urn(String) // requiredurn.name(String) // requiredname.addTypeParameters|addAllTypeParameters(io.substrait.type.Type.Parameter) //typeParameterselements .addFields|addAllFields(io.substrait.expression.Expression.Literal) //fieldselements .build();- Returns:
- A new UserDefinedStructLiteral builder
-