Package io.substrait.relation.physical
Class ImmutableExchangeTarget
java.lang.Object
io.substrait.relation.physical.AbstractExchangeRel.ExchangeTarget
io.substrait.relation.physical.ImmutableExchangeTarget
Immutable implementation of
AbstractExchangeRel.ExchangeTarget.
Use the builder to create immutable instances:
ImmutableExchangeTarget.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableExchangeTarget. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableExchangeTarget.static ImmutableExchangeTargetcopyOf(AbstractExchangeRel.ExchangeTarget instance) Creates an immutable copy of aAbstractExchangeRel.ExchangeTargetvalue.booleanThis instance is equal to all instances ofImmutableExchangeTargetthat have equal attribute values.Returns the partition IDs served by this target.getType()Returns the target type (e.g., local, remote).inthashCode()Computes a hash code from attributes:partitionIds,type.toString()Prints the immutable valueExchangeTargetwith attribute values.final ImmutableExchangeTargetwithPartitionIds(int... elements) Copy the current immutable object with elements that replace the content ofpartitionIds.final ImmutableExchangeTargetwithPartitionIds(Iterable<Integer> elements) Copy the current immutable object with elements that replace the content ofpartitionIds.final ImmutableExchangeTargetwithType(TargetType value) Copy the current immutable object by setting a value for thetypeattribute.
-
Method Details
-
getPartitionIds
Returns the partition IDs served by this target.- Specified by:
getPartitionIdsin classAbstractExchangeRel.ExchangeTarget- Returns:
- list of partition IDs
-
getType
Returns the target type (e.g., local, remote).- Specified by:
getTypein classAbstractExchangeRel.ExchangeTarget- Returns:
- the target type
-
withPartitionIds
Copy the current immutable object with elements that replace the content ofpartitionIds.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPartitionIds
Copy the current immutable object with elements that replace the content ofpartitionIds. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of partitionIds elements to set- Returns:
- A modified copy or
thisif not changed
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableExchangeTargetthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:partitionIds,type. -
toString
Prints the immutable valueExchangeTargetwith attribute values. -
copyOf
Creates an immutable copy of aAbstractExchangeRel.ExchangeTargetvalue. 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 ExchangeTarget instance
-
builder
Creates a builder forImmutableExchangeTarget.ImmutableExchangeTarget.builder() .addPartitionIds|addAllPartitionIds(int) //partitionIdselements .type(io.substrait.relation.physical.TargetType) // requiredtype.build();- Returns:
- A new ImmutableExchangeTarget builder
-