Package io.substrait.extension
Class ImmutableSimpleExtension.ScalarFunctionVariant
java.lang.Object
io.substrait.extension.SimpleExtension.Function
io.substrait.extension.SimpleExtension.ScalarFunctionVariant
io.substrait.extension.ImmutableSimpleExtension.ScalarFunctionVariant
- Enclosing class:
- ImmutableSimpleExtension
public static final class ImmutableSimpleExtension.ScalarFunctionVariant
extends SimpleExtension.ScalarFunctionVariant
Immutable implementation of
SimpleExtension.ScalarFunctionVariant.
Use the builder to create immutable instances:
ImmutableSimpleExtension.ScalarFunctionVariant.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeScalarFunctionVariant. -
Method Summary
Modifier and TypeMethodDescriptionargs()builder()Creates a builder forScalarFunctionVariant.copyOf(SimpleExtension.ScalarFunctionVariant instance) Creates an immutable copy of aSimpleExtension.ScalarFunctionVariantvalue.@Nullable StringbooleanThis instance is equal to all instances ofScalarFunctionVariantthat have equal attribute values.inthashCode()Computes a hash code from attributes:name,urn,variadic,description,args,options,metadata,nullability,ordered,returnType.metadata()name()options()@Nullable Booleanordered()urn()variadic()withArgs(SimpleExtension.Argument... elements) Copy the current immutable object with elements that replace the content ofargs.withArgs(Iterable<? extends SimpleExtension.Argument> elements) Copy the current immutable object with elements that replace the content ofargs.withDescription(@Nullable String value) Copy the current immutable object by setting a value for thedescriptionattribute.withMetadata(Map<String, Object> value) Copy the current immutable object by setting a present value for the optionalmetadataattribute.withMetadata(Optional<? extends Map<String, Object>> optional) Copy the current immutable object by setting an optional value for themetadataattribute.Copy the current immutable object by setting a value for thenameattribute.Copy the current immutable object by setting a value for thenullabilityattribute.withOptions(Map<String, ? extends SimpleExtension.Option> entries) Copy the current immutable object by replacing theoptionsmap with the specified map.withOrdered(@Nullable Boolean value) Copy the current immutable object by setting a value for theorderedattribute.withReturnType(TypeExpression value) Copy the current immutable object by setting a value for thereturnTypeattribute.Copy the current immutable object by setting a value for theurnattribute.Copy the current immutable object by setting a present value for the optionalvariadicattribute.withVariadic(Optional<? extends SimpleExtension.VariadicBehavior> optional) Copy the current immutable object by setting an optional value for thevariadicattribute.Methods inherited from class io.substrait.extension.SimpleExtension.ScalarFunctionVariant
resolveMethods inherited from class io.substrait.extension.SimpleExtension.Function
constructKey, constructKeyFromTypes, getAnchor, getRange, key, requiredArguments, resolveType, toString, validateOutputType
-
Method Details
-
name
- Overrides:
namein classSimpleExtension.Function- Returns:
- The value of the
nameattribute
-
urn
- Overrides:
urnin classSimpleExtension.Function- Returns:
- The value of the
urnattribute
-
variadic
- Specified by:
variadicin classSimpleExtension.Function- Returns:
- The value of the
variadicattribute
-
description
- Overrides:
descriptionin classSimpleExtension.Function- Returns:
- The value of the
descriptionattribute
-
args
- Specified by:
argsin classSimpleExtension.Function- Returns:
- The value of the
argsattribute
-
options
- Specified by:
optionsin classSimpleExtension.Function- Returns:
- The value of the
optionsattribute
-
metadata
- Specified by:
metadatain classSimpleExtension.Function- Returns:
- The value of the
metadataattribute
-
nullability
- Overrides:
nullabilityin classSimpleExtension.Function- Returns:
- The value of the
nullabilityattribute
-
ordered
- Specified by:
orderedin classSimpleExtension.Function- Returns:
- The value of the
orderedattribute
-
returnType
- Specified by:
returnTypein classSimpleExtension.Function- Returns:
- The value of the
returnTypeattribute
-
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
-
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
-
withVariadic
public final ImmutableSimpleExtension.ScalarFunctionVariant withVariadic(SimpleExtension.VariadicBehavior value) Copy the current immutable object by setting a present value for the optionalvariadicattribute.- Parameters:
value- The value for variadic- Returns:
- A modified copy or
thisif not changed
-
withVariadic
public final ImmutableSimpleExtension.ScalarFunctionVariant withVariadic(Optional<? extends SimpleExtension.VariadicBehavior> optional) Copy the current immutable object by setting an optional value for thevariadicattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for variadic- Returns:
- A modified copy or
thisif not changed
-
withDescription
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description (can benull)- Returns:
- A modified copy or the
thisobject
-
withArgs
public final ImmutableSimpleExtension.ScalarFunctionVariant withArgs(SimpleExtension.Argument... elements) Copy the current immutable object with elements that replace the content ofargs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withArgs
public final ImmutableSimpleExtension.ScalarFunctionVariant withArgs(Iterable<? extends SimpleExtension.Argument> elements) Copy the current immutable object with elements that replace the content ofargs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of args elements to set- Returns:
- A modified copy or
thisif not changed
-
withOptions
public final ImmutableSimpleExtension.ScalarFunctionVariant withOptions(Map<String, ? extends SimpleExtension.Option> entries) Copy the current immutable object by replacing theoptionsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to replace the options map- Returns:
- A modified copy or
thisif not changed
-
withMetadata
Copy the current immutable object by setting a present value for the optionalmetadataattribute.- Parameters:
value- The value for metadata- Returns:
- A modified copy or
thisif not changed
-
withMetadata
public final ImmutableSimpleExtension.ScalarFunctionVariant withMetadata(Optional<? extends Map<String, Object>> optional) Copy the current immutable object by setting an optional value for themetadataattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for metadata- Returns:
- A modified copy or
thisif not changed
-
withNullability
public final ImmutableSimpleExtension.ScalarFunctionVariant withNullability(SimpleExtension.Nullability value) Copy the current immutable object by setting a value for thenullabilityattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for nullability- Returns:
- A modified copy or the
thisobject
-
withOrdered
Copy the current immutable object by setting a value for theorderedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ordered (can benull)- Returns:
- A modified copy or the
thisobject
-
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 ofScalarFunctionVariantthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,urn,variadic,description,args,options,metadata,nullability,ordered,returnType. -
copyOf
public static ImmutableSimpleExtension.ScalarFunctionVariant copyOf(SimpleExtension.ScalarFunctionVariant instance) Creates an immutable copy of aSimpleExtension.ScalarFunctionVariantvalue. 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 ScalarFunctionVariant instance
-
builder
Creates a builder forScalarFunctionVariant.ImmutableSimpleExtension.ScalarFunctionVariant.builder() .name(String) // optionalname.urn(String) // optionalurn.variadic(Optional<io.substrait.extension.SimpleExtension.VariadicBehavior>) // optionalvariadic.description(String | null) // nullabledescription.addArgs|addAllArgs(io.substrait.extension.SimpleExtension.Argument) //argselements .putOptions|putAllOptions(String => io.substrait.extension.SimpleExtension.Option) //optionsmappings .metadata(Optional<Map<String, Object>>) // optionalmetadata.nullability(io.substrait.extension.SimpleExtension.Nullability) // optionalnullability.ordered(Boolean | null) // nullableordered.returnType(io.substrait.function.TypeExpression) // requiredreturnType.build();- Returns:
- A new ScalarFunctionVariant builder
-