Package io.substrait.relation
Class ImmutableNamedUpdate
java.lang.Object
io.substrait.relation.AbstractRel
io.substrait.relation.ZeroInputRel
io.substrait.relation.AbstractUpdate
io.substrait.relation.NamedUpdate
io.substrait.relation.ImmutableNamedUpdate
- All Implemented Interfaces:
HasExtension,Rel
Immutable implementation of
NamedUpdate.
Use the builder to create immutable instances:
ImmutableNamedUpdate.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableNamedUpdate.Nested classes/interfaces inherited from class io.substrait.relation.AbstractUpdate
AbstractUpdate.TransformExpression -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableNamedUpdate.Builderbuilder()Creates a builder forImmutableNamedUpdate.static ImmutableNamedUpdatecopyOf(NamedUpdate instance) Creates an immutable copy of aNamedUpdatevalue.booleanThis instance is equal to all instances ofImmutableNamedUpdatethat have equal attribute values.Returns the condition that determines which rows to update.getHint()getNames()getRemap()Returns the schema of the target table.Returns the list of column transformations to apply.inthashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,tableSchema,condition,transformations,names.toString()Prints the immutable valueNamedUpdatewith attribute values.final ImmutableNamedUpdateCopy the current immutable object by setting a present value for the optionalcommonExtensionattribute.final ImmutableNamedUpdatewithCommonExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for thecommonExtensionattribute.final ImmutableNamedUpdatewithCondition(Expression value) Copy the current immutable object by setting a value for theconditionattribute.final ImmutableNamedUpdatewithExtension(AdvancedExtension value) Copy the current immutable object by setting a present value for the optionalextensionattribute.final ImmutableNamedUpdatewithExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for theextensionattribute.final ImmutableNamedUpdateCopy the current immutable object by setting a present value for the optionalhintattribute.final ImmutableNamedUpdateCopy the current immutable object by setting an optional value for thehintattribute.final ImmutableNamedUpdateCopy the current immutable object with elements that replace the content ofnames.final ImmutableNamedUpdateCopy the current immutable object with elements that replace the content ofnames.final ImmutableNamedUpdateCopy the current immutable object by setting a present value for the optionalremapattribute.final ImmutableNamedUpdateCopy the current immutable object by setting an optional value for theremapattribute.final ImmutableNamedUpdatewithTableSchema(NamedStruct value) Copy the current immutable object by setting a value for thetableSchemaattribute.final ImmutableNamedUpdatewithTransformations(AbstractUpdate.TransformExpression... elements) Copy the current immutable object with elements that replace the content oftransformations.final ImmutableNamedUpdatewithTransformations(Iterable<? extends AbstractUpdate.TransformExpression> elements) Copy the current immutable object with elements that replace the content oftransformations.Methods inherited from class io.substrait.relation.NamedUpdate
acceptMethods inherited from class io.substrait.relation.AbstractUpdate
deriveRecordTypeMethods inherited from class io.substrait.relation.ZeroInputRel
getInputsMethods inherited from class io.substrait.relation.AbstractRel
getRecordType
-
Method Details
-
getExtension
- Returns:
- the
AdvancedExtensionassociated directly with the class
-
getRemap
- Returns:
- The value of the
remapattribute
-
getCommonExtension
- Returns:
- the
AdvancedExtensionassociated with aRelCommonmessage, if present
-
getHint
- Returns:
- The value of the
hintattribute
-
getTableSchema
Returns the schema of the target table.- Specified by:
getTableSchemain classAbstractUpdate- Returns:
- table schema as
NamedStruct
-
getCondition
Returns the condition that determines which rows to update.- Specified by:
getConditionin classAbstractUpdate- Returns:
- update condition expression
-
getTransformations
Returns the list of column transformations to apply.- Specified by:
getTransformationsin classAbstractUpdate- Returns:
- list of
AbstractUpdate.TransformExpression
-
getNames
- Specified by:
getNamesin classNamedUpdate- Returns:
- The value of the
namesattribute
-
withExtension
Copy the current immutable object by setting a present value for the optionalextensionattribute.- Parameters:
value- The value for extension- Returns:
- A modified copy or
thisif not changed
-
withExtension
Copy the current immutable object by setting an optional value for theextensionattribute. 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 extension- Returns:
- A modified copy or
thisif not changed
-
withRemap
Copy the current immutable object by setting a present value for the optionalremapattribute.- Parameters:
value- The value for remap- Returns:
- A modified copy or
thisif not changed
-
withRemap
Copy the current immutable object by setting an optional value for theremapattribute. 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 remap- Returns:
- A modified copy or
thisif not changed
-
withCommonExtension
Copy the current immutable object by setting a present value for the optionalcommonExtensionattribute.- Parameters:
value- The value for commonExtension- Returns:
- A modified copy or
thisif not changed
-
withCommonExtension
public final ImmutableNamedUpdate withCommonExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for thecommonExtensionattribute. 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 commonExtension- Returns:
- A modified copy or
thisif not changed
-
withHint
Copy the current immutable object by setting a present value for the optionalhintattribute.- Parameters:
value- The value for hint- Returns:
- A modified copy or
thisif not changed
-
withHint
Copy the current immutable object by setting an optional value for thehintattribute. 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 hint- Returns:
- A modified copy or
thisif not changed
-
withTableSchema
Copy the current immutable object by setting a value for thetableSchemaattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tableSchema- Returns:
- A modified copy or the
thisobject
-
withCondition
Copy the current immutable object by setting a value for theconditionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for condition- Returns:
- A modified copy or the
thisobject
-
withTransformations
public final ImmutableNamedUpdate withTransformations(AbstractUpdate.TransformExpression... elements) Copy the current immutable object with elements that replace the content oftransformations.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTransformations
public final ImmutableNamedUpdate withTransformations(Iterable<? extends AbstractUpdate.TransformExpression> elements) Copy the current immutable object with elements that replace the content oftransformations. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of transformations elements to set- Returns:
- A modified copy or
thisif not changed
-
withNames
Copy the current immutable object with elements that replace the content ofnames.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withNames
Copy the current immutable object with elements that replace the content ofnames. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of names elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableNamedUpdatethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,tableSchema,condition,transformations,names. -
toString
Prints the immutable valueNamedUpdatewith attribute values. -
copyOf
Creates an immutable copy of aNamedUpdatevalue. 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 NamedUpdate instance
-
builder
Creates a builder forImmutableNamedUpdate.ImmutableNamedUpdate.builder() .extension(Optional<io.substrait.extension.AdvancedExtension>) // optionalextension.remap(Optional<io.substrait.relation.Rel.Remap>) // optionalremap.commonExtension(Optional<io.substrait.extension.AdvancedExtension>) // optionalcommonExtension.hint(Optional<io.substrait.hint.Hint>) // optionalhint.tableSchema(io.substrait.type.NamedStruct) // requiredtableSchema.condition(io.substrait.expression.Expression) // requiredcondition.addTransformations|addAllTransformations(io.substrait.relation.AbstractUpdate.TransformExpression) //transformationselements .addNames|addAllNames(String) //nameselements .build();- Returns:
- A new ImmutableNamedUpdate builder
-