Package io.substrait.relation.physical
Class ImmutableMultiBucketExchange
java.lang.Object
io.substrait.relation.AbstractRel
io.substrait.relation.SingleInputRel
io.substrait.relation.physical.AbstractExchangeRel
io.substrait.relation.physical.MultiBucketExchange
io.substrait.relation.physical.ImmutableMultiBucketExchange
- All Implemented Interfaces:
HasExtension,Rel
Immutable implementation of
MultiBucketExchange.
Use the builder to create immutable instances:
ImmutableMultiBucketExchange.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableMultiBucketExchange.Nested classes/interfaces inherited from class io.substrait.relation.physical.AbstractExchangeRel
AbstractExchangeRel.ExchangeTarget -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableMultiBucketExchange.static ImmutableMultiBucketExchangecopyOf(MultiBucketExchange instance) Creates an immutable copy of aMultiBucketExchangevalue.booleanThis instance is equal to all instances ofImmutableMultiBucketExchangethat have equal attribute values.booleangetHint()getInput()Returns the number of partitions for this exchange.getRemap()Returns the configured exchange targets.inthashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,input,partitionCount,targets,expression,constrainedToCount.toString()Prints the immutable valueMultiBucketExchangewith attribute values.Copy the current immutable object by setting a present value for the optionalcommonExtensionattribute.withCommonExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for thecommonExtensionattribute.withConstrainedToCount(boolean value) Copy the current immutable object by setting a value for theconstrainedToCountattribute.withExpression(Expression value) Copy the current immutable object by setting a value for theexpressionattribute.withExtension(AdvancedExtension value) Copy the current immutable object by setting a present value for the optionalextensionattribute.withExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for theextensionattribute.Copy the current immutable object by setting a present value for the optionalhintattribute.Copy the current immutable object by setting an optional value for thehintattribute.Copy the current immutable object by setting a value for theinputattribute.withPartitionCount(Integer value) Copy the current immutable object by setting a value for thepartitionCountattribute.Copy the current immutable object by setting a present value for the optionalremapattribute.Copy the current immutable object by setting an optional value for theremapattribute.withTargets(AbstractExchangeRel.ExchangeTarget... elements) Copy the current immutable object with elements that replace the content oftargets.withTargets(Iterable<? extends AbstractExchangeRel.ExchangeTarget> elements) Copy the current immutable object with elements that replace the content oftargets.Methods inherited from class io.substrait.relation.physical.MultiBucketExchange
acceptMethods inherited from class io.substrait.relation.physical.AbstractExchangeRel
deriveRecordTypeMethods inherited from class io.substrait.relation.SingleInputRel
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
-
getInput
- Specified by:
getInputin classSingleInputRel- Returns:
- The value of the
inputattribute
-
getPartitionCount
Returns the number of partitions for this exchange.- Specified by:
getPartitionCountin classAbstractExchangeRel- Returns:
- the partition count, or
nullif unspecified
-
getTargets
Returns the configured exchange targets.- Specified by:
getTargetsin classAbstractExchangeRel- Returns:
- the list of exchange targets (never
null)
-
getExpression
- Specified by:
getExpressionin classMultiBucketExchange- Returns:
- The value of the
expressionattribute
-
getConstrainedToCount
public boolean getConstrainedToCount()- Specified by:
getConstrainedToCountin classMultiBucketExchange- Returns:
- The value of the
constrainedToCountattribute
-
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
public final ImmutableMultiBucketExchange withExtension(Optional<? extends AdvancedExtension> optional) 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 ImmutableMultiBucketExchange 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
-
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
-
withPartitionCount
Copy the current immutable object by setting a value for thepartitionCountattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for partitionCount- Returns:
- A modified copy or the
thisobject
-
withTargets
public final ImmutableMultiBucketExchange withTargets(AbstractExchangeRel.ExchangeTarget... elements) Copy the current immutable object with elements that replace the content oftargets.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTargets
public final ImmutableMultiBucketExchange withTargets(Iterable<? extends AbstractExchangeRel.ExchangeTarget> elements) Copy the current immutable object with elements that replace the content oftargets. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of targets elements to set- Returns:
- A modified copy or
thisif not changed
-
withExpression
Copy the current immutable object by setting a value for theexpressionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for expression- Returns:
- A modified copy or the
thisobject
-
withConstrainedToCount
Copy the current immutable object by setting a value for theconstrainedToCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for constrainedToCount- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableMultiBucketExchangethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,input,partitionCount,targets,expression,constrainedToCount. -
toString
Prints the immutable valueMultiBucketExchangewith attribute values. -
copyOf
Creates an immutable copy of aMultiBucketExchangevalue. 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 MultiBucketExchange instance
-
builder
Creates a builder forImmutableMultiBucketExchange.ImmutableMultiBucketExchange.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.input(io.substrait.relation.Rel) // requiredinput.partitionCount(Integer) // requiredpartitionCount.addTargets|addAllTargets(io.substrait.relation.physical.AbstractExchangeRel.ExchangeTarget) //targetselements .expression(io.substrait.expression.Expression) // requiredexpression.constrainedToCount(boolean) // requiredconstrainedToCount.build();- Returns:
- A new ImmutableMultiBucketExchange builder
-