Package io.substrait.relation
Class ImmutableExtensionLeaf
java.lang.Object
io.substrait.relation.AbstractRel
io.substrait.relation.ZeroInputRel
io.substrait.relation.ExtensionLeaf
io.substrait.relation.ImmutableExtensionLeaf
- All Implemented Interfaces:
Rel
Immutable implementation of
ExtensionLeaf.
Use the builder to create immutable instances:
ImmutableExtensionLeaf.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableExtensionLeaf. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableExtensionLeaf.static ImmutableExtensionLeafcopyOf(ExtensionLeaf instance) Creates an immutable copy of aExtensionLeafvalue.protected Type.StructbooleanThis instance is equal to all instances ofImmutableExtensionLeafthat have equal attribute values.getHint()getRemap()inthashCode()Computes a hash code from attributes:remap,commonExtension,hint,deriveRecordType,detail.toString()Prints the immutable valueExtensionLeafwith attribute values.final ImmutableExtensionLeafCopy the current immutable object by setting a present value for the optionalcommonExtensionattribute.final ImmutableExtensionLeafwithCommonExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for thecommonExtensionattribute.final ImmutableExtensionLeafwithDeriveRecordType(Type.Struct value) Copy the current immutable object by setting a value for thederiveRecordTypeattribute.final ImmutableExtensionLeafCopy the current immutable object by setting a value for thedetailattribute.final ImmutableExtensionLeafCopy the current immutable object by setting a present value for the optionalhintattribute.final ImmutableExtensionLeafCopy the current immutable object by setting an optional value for thehintattribute.final ImmutableExtensionLeafCopy the current immutable object by setting a present value for the optionalremapattribute.final ImmutableExtensionLeafCopy the current immutable object by setting an optional value for theremapattribute.Methods inherited from class io.substrait.relation.ExtensionLeaf
accept, fromMethods inherited from class io.substrait.relation.ZeroInputRel
getInputsMethods inherited from class io.substrait.relation.AbstractRel
getRecordType
-
Method Details
-
getRemap
- Returns:
- The value of the
remapattribute
-
getCommonExtension
- Returns:
- the
AdvancedExtensionassociated with aRelCommonmessage, if present
-
getHint
- Returns:
- The value of the
hintattribute
-
deriveRecordType
- Specified by:
deriveRecordTypein classAbstractRel- Returns:
- The value of the
deriveRecordTypeattribute
-
getDetail
- Specified by:
getDetailin classExtensionLeaf- Returns:
- The value of the
detailattribute
-
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 ImmutableExtensionLeaf 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
-
withDeriveRecordType
Copy the current immutable object by setting a value for thederiveRecordTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deriveRecordType- Returns:
- A modified copy or the
thisobject
-
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 ofImmutableExtensionLeafthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:remap,commonExtension,hint,deriveRecordType,detail. -
toString
Prints the immutable valueExtensionLeafwith attribute values. -
copyOf
Creates an immutable copy of aExtensionLeafvalue. 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 ExtensionLeaf instance
-
builder
Creates a builder forImmutableExtensionLeaf.ImmutableExtensionLeaf.builder() .remap(Optional<io.substrait.relation.Rel.Remap>) // optionalremap.commonExtension(Optional<io.substrait.extension.AdvancedExtension>) // optionalcommonExtension.hint(Optional<io.substrait.hint.Hint>) // optionalhint.deriveRecordType(io.substrait.type.Type.Struct) // requiredderiveRecordType.detail(io.substrait.relation.Extension.LeafRelDetail) // requireddetail.build();- Returns:
- A new ImmutableExtensionLeaf builder
-