Package io.substrait.relation
Class ImmutableExtensionSingle
java.lang.Object
io.substrait.relation.AbstractRel
io.substrait.relation.SingleInputRel
io.substrait.relation.ExtensionSingle
io.substrait.relation.ImmutableExtensionSingle
- All Implemented Interfaces:
Rel
Immutable implementation of
ExtensionSingle.
Use the builder to create immutable instances:
ImmutableExtensionSingle.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableExtensionSingle. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableExtensionSingle.static ImmutableExtensionSinglecopyOf(ExtensionSingle instance) Creates an immutable copy of aExtensionSinglevalue.protected Type.StructbooleanThis instance is equal to all instances ofImmutableExtensionSinglethat have equal attribute values.getHint()getInput()getRemap()inthashCode()Computes a hash code from attributes:remap,commonExtension,hint,deriveRecordType,input,detail.toString()Prints the immutable valueExtensionSinglewith attribute values.final ImmutableExtensionSingleCopy the current immutable object by setting a present value for the optionalcommonExtensionattribute.final ImmutableExtensionSinglewithCommonExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for thecommonExtensionattribute.final ImmutableExtensionSinglewithDeriveRecordType(Type.Struct value) Copy the current immutable object by setting a value for thederiveRecordTypeattribute.final ImmutableExtensionSingleCopy the current immutable object by setting a value for thedetailattribute.final ImmutableExtensionSingleCopy the current immutable object by setting a present value for the optionalhintattribute.final ImmutableExtensionSingleCopy the current immutable object by setting an optional value for thehintattribute.final ImmutableExtensionSingleCopy the current immutable object by setting a value for theinputattribute.final ImmutableExtensionSingleCopy the current immutable object by setting a present value for the optionalremapattribute.final ImmutableExtensionSingleCopy the current immutable object by setting an optional value for theremapattribute.Methods inherited from class io.substrait.relation.ExtensionSingle
accept, fromMethods inherited from class io.substrait.relation.SingleInputRel
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
-
getInput
- Specified by:
getInputin classSingleInputRel- Returns:
- The value of the
inputattribute
-
getDetail
- Specified by:
getDetailin classExtensionSingle- 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 ImmutableExtensionSingle 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
-
withInput
Copy the current immutable object by setting a value for theinputattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for input- 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 ofImmutableExtensionSinglethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:remap,commonExtension,hint,deriveRecordType,input,detail. -
toString
Prints the immutable valueExtensionSinglewith attribute values. -
copyOf
Creates an immutable copy of aExtensionSinglevalue. 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 ExtensionSingle instance
-
builder
Creates a builder forImmutableExtensionSingle.ImmutableExtensionSingle.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.input(io.substrait.relation.Rel) // requiredinput.detail(io.substrait.relation.Extension.SingleRelDetail) // requireddetail.build();- Returns:
- A new ImmutableExtensionSingle builder
-