Package io.substrait.relation
Class ImmutableExtensionDdl
java.lang.Object
io.substrait.relation.AbstractRel
io.substrait.relation.ZeroInputRel
io.substrait.relation.AbstractDdlRel
io.substrait.relation.ExtensionDdl
io.substrait.relation.ImmutableExtensionDdl
- All Implemented Interfaces:
HasExtension,Rel
Immutable implementation of
ExtensionDdl.
Use the builder to create immutable instances:
ImmutableExtensionDdl.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableExtensionDdl.Nested classes/interfaces inherited from class io.substrait.relation.AbstractDdlRel
AbstractDdlRel.DdlObject, AbstractDdlRel.DdlOp -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableExtensionDdl.static ImmutableExtensionDdlcopyOf(ExtensionDdl instance) Creates an immutable copy of aExtensionDdlvalue.booleanThis instance is equal to all instances ofImmutableExtensionDdlthat have equal attribute values.getHint()Returns the DDL object kind (table or view).Returns the DDL operation (create/alter/drop, etc.).getRemap()Returns default values for the table columns.Returns the target table/view schema (names + types).Returns the view definition when the object is a view.inthashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,tableSchema,tableDefaults,object,operation,viewDefinition,detail.toString()Prints the immutable valueExtensionDdlwith attribute values.final ImmutableExtensionDdlCopy the current immutable object by setting a present value for the optionalcommonExtensionattribute.final ImmutableExtensionDdlwithCommonExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for thecommonExtensionattribute.final ImmutableExtensionDdlCopy the current immutable object by setting a value for thedetailattribute.final ImmutableExtensionDdlwithExtension(AdvancedExtension value) Copy the current immutable object by setting a present value for the optionalextensionattribute.final ImmutableExtensionDdlwithExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for theextensionattribute.final ImmutableExtensionDdlCopy the current immutable object by setting a present value for the optionalhintattribute.final ImmutableExtensionDdlCopy the current immutable object by setting an optional value for thehintattribute.final ImmutableExtensionDdlCopy the current immutable object by setting a value for theobjectattribute.final ImmutableExtensionDdlCopy the current immutable object by setting a value for theoperationattribute.final ImmutableExtensionDdlCopy the current immutable object by setting a present value for the optionalremapattribute.final ImmutableExtensionDdlCopy the current immutable object by setting an optional value for theremapattribute.final ImmutableExtensionDdlCopy the current immutable object by setting a value for thetableDefaultsattribute.final ImmutableExtensionDdlwithTableSchema(NamedStruct value) Copy the current immutable object by setting a value for thetableSchemaattribute.final ImmutableExtensionDdlwithViewDefinition(Rel value) Copy the current immutable object by setting a present value for the optionalviewDefinitionattribute.final ImmutableExtensionDdlwithViewDefinition(Optional<? extends Rel> optional) Copy the current immutable object by setting an optional value for theviewDefinitionattribute.Methods inherited from class io.substrait.relation.ExtensionDdl
acceptMethods inherited from class io.substrait.relation.AbstractDdlRel
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 target table/view schema (names + types).- Specified by:
getTableSchemain classAbstractDdlRel- Returns:
- target
NamedStruct
-
getTableDefaults
Returns default values for the table columns.- Specified by:
getTableDefaultsin classAbstractDdlRel- Returns:
- defaults as
Expression.StructLiteral
-
getObject
Returns the DDL object kind (table or view).- Specified by:
getObjectin classAbstractDdlRel- Returns:
- DDL object
-
getOperation
Returns the DDL operation (create/alter/drop, etc.).- Specified by:
getOperationin classAbstractDdlRel- Returns:
- DDL operation
-
getViewDefinition
Returns the view definition when the object is a view.- Specified by:
getViewDefinitionin classAbstractDdlRel- Returns:
- optional view definition relation
-
getDetail
- Specified by:
getDetailin classExtensionDdl- Returns:
- The value of the
detailattribute
-
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 ImmutableExtensionDdl 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
-
withTableDefaults
Copy the current immutable object by setting a value for thetableDefaultsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tableDefaults- Returns:
- A modified copy or the
thisobject
-
withObject
Copy the current immutable object by setting a value for theobjectattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for object- Returns:
- A modified copy or the
thisobject
-
withOperation
Copy the current immutable object by setting a value for theoperationattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for operation- Returns:
- A modified copy or the
thisobject
-
withViewDefinition
Copy the current immutable object by setting a present value for the optionalviewDefinitionattribute.- Parameters:
value- The value for viewDefinition- Returns:
- A modified copy or
thisif not changed
-
withViewDefinition
Copy the current immutable object by setting an optional value for theviewDefinitionattribute. 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 viewDefinition- Returns:
- A modified copy or
thisif not changed
-
withDetail
Copy the current immutable object by setting a value for thedetailattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for detail- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableExtensionDdlthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,tableSchema,tableDefaults,object,operation,viewDefinition,detail. -
toString
Prints the immutable valueExtensionDdlwith attribute values. -
copyOf
Creates an immutable copy of aExtensionDdlvalue. 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 ExtensionDdl instance
-
builder
Creates a builder forImmutableExtensionDdl.ImmutableExtensionDdl.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.tableDefaults(io.substrait.expression.Expression.StructLiteral) // requiredtableDefaults.object(io.substrait.relation.AbstractDdlRel.DdlObject) // requiredobject.operation(io.substrait.relation.AbstractDdlRel.DdlOp) // requiredoperation.viewDefinition(Optional<io.substrait.relation.Rel>) // optionalviewDefinition.detail(io.substrait.relation.Extension.DdlExtensionObject) // requireddetail.build();- Returns:
- A new ImmutableExtensionDdl builder
-