Package io.substrait.relation
Class ImmutableExtensionTable
java.lang.Object
io.substrait.relation.AbstractRel
io.substrait.relation.ZeroInputRel
io.substrait.relation.AbstractReadRel
io.substrait.relation.ExtensionTable
io.substrait.relation.ImmutableExtensionTable
- All Implemented Interfaces:
HasExtension,Rel
Immutable implementation of
ExtensionTable.
Use the builder to create immutable instances:
ImmutableExtensionTable.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableExtensionTable. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableExtensionTable.static ImmutableExtensionTablecopyOf(ExtensionTable instance) Creates an immutable copy of aExtensionTablevalue.booleanThis instance is equal to all instances ofImmutableExtensionTablethat have equal attribute values.getHint()getRemap()inthashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,initialSchema,filter,bestEffortFilter,detail.toString()Prints the immutable valueExtensionTablewith attribute values.final ImmutableExtensionTablewithBestEffortFilter(Expression value) Copy the current immutable object by setting a present value for the optionalbestEffortFilterattribute.final ImmutableExtensionTablewithBestEffortFilter(Optional<? extends Expression> optional) Copy the current immutable object by setting an optional value for thebestEffortFilterattribute.final ImmutableExtensionTableCopy the current immutable object by setting a present value for the optionalcommonExtensionattribute.final ImmutableExtensionTablewithCommonExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for thecommonExtensionattribute.final ImmutableExtensionTableCopy the current immutable object by setting a value for thedetailattribute.final ImmutableExtensionTablewithExtension(AdvancedExtension value) Copy the current immutable object by setting a present value for the optionalextensionattribute.final ImmutableExtensionTablewithExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for theextensionattribute.final ImmutableExtensionTablewithFilter(Expression value) Copy the current immutable object by setting a present value for the optionalfilterattribute.final ImmutableExtensionTablewithFilter(Optional<? extends Expression> optional) Copy the current immutable object by setting an optional value for thefilterattribute.final ImmutableExtensionTableCopy the current immutable object by setting a present value for the optionalhintattribute.final ImmutableExtensionTableCopy the current immutable object by setting an optional value for thehintattribute.final ImmutableExtensionTablewithInitialSchema(NamedStruct value) Copy the current immutable object by setting a value for theinitialSchemaattribute.final ImmutableExtensionTableCopy the current immutable object by setting a present value for the optionalremapattribute.final ImmutableExtensionTableCopy the current immutable object by setting an optional value for theremapattribute.Methods inherited from class io.substrait.relation.ExtensionTable
accept, fromMethods inherited from class io.substrait.relation.AbstractReadRel
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
-
getInitialSchema
- Specified by:
getInitialSchemain classAbstractReadRel- Returns:
- The value of the
initialSchemaattribute
-
getFilter
- Specified by:
getFilterin classAbstractReadRel- Returns:
- The value of the
filterattribute
-
getBestEffortFilter
- Specified by:
getBestEffortFilterin classAbstractReadRel- Returns:
- The value of the
bestEffortFilterattribute
-
getDetail
- Specified by:
getDetailin classExtensionTable- 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 ImmutableExtensionTable 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
-
withInitialSchema
Copy the current immutable object by setting a value for theinitialSchemaattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for initialSchema- Returns:
- A modified copy or the
thisobject
-
withFilter
Copy the current immutable object by setting a present value for the optionalfilterattribute.- Parameters:
value- The value for filter- Returns:
- A modified copy or
thisif not changed
-
withFilter
Copy the current immutable object by setting an optional value for thefilterattribute. 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 filter- Returns:
- A modified copy or
thisif not changed
-
withBestEffortFilter
Copy the current immutable object by setting a present value for the optionalbestEffortFilterattribute.- Parameters:
value- The value for bestEffortFilter- Returns:
- A modified copy or
thisif not changed
-
withBestEffortFilter
Copy the current immutable object by setting an optional value for thebestEffortFilterattribute. 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 bestEffortFilter- 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 ofImmutableExtensionTablethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,initialSchema,filter,bestEffortFilter,detail. -
toString
Prints the immutable valueExtensionTablewith attribute values. -
copyOf
Creates an immutable copy of aExtensionTablevalue. 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 ExtensionTable instance
-
builder
Creates a builder forImmutableExtensionTable.ImmutableExtensionTable.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.initialSchema(io.substrait.type.NamedStruct) // requiredinitialSchema.filter(Optional<io.substrait.expression.Expression>) // optionalfilter.bestEffortFilter(Optional<io.substrait.expression.Expression>) // optionalbestEffortFilter.detail(io.substrait.relation.Extension.ExtensionTableDetail) // requireddetail.build();- Returns:
- A new ImmutableExtensionTable builder
-