Class ImmutableHashJoin

All Implemented Interfaces:
HasExtension, Rel

public final class ImmutableHashJoin extends HashJoin
Immutable implementation of HashJoin.

Use the builder to create immutable instances: ImmutableHashJoin.builder().

  • Method Details

    • getExtension

      public Optional<AdvancedExtension> getExtension()
      Returns:
      the AdvancedExtension associated directly with the class
    • getRemap

      public Optional<Rel.Remap> getRemap()
      Returns:
      The value of the remap attribute
    • getCommonExtension

      public Optional<AdvancedExtension> getCommonExtension()
      Returns:
      the AdvancedExtension associated with a RelCommon message, if present
    • getHint

      public Optional<Hint> getHint()
      Returns:
      The value of the hint attribute
    • getLeft

      public Rel getLeft()
      Specified by:
      getLeft in class BiRel
      Returns:
      The value of the left attribute
    • getRight

      public Rel getRight()
      Specified by:
      getRight in class BiRel
      Returns:
      The value of the right attribute
    • getLeftKeys

      public List<FieldReference> getLeftKeys()
      Specified by:
      getLeftKeys in class HashJoin
      Returns:
      The value of the leftKeys attribute
    • getRightKeys

      public List<FieldReference> getRightKeys()
      Specified by:
      getRightKeys in class HashJoin
      Returns:
      The value of the rightKeys attribute
    • getJoinType

      public HashJoin.JoinType getJoinType()
      Specified by:
      getJoinType in class HashJoin
      Returns:
      The value of the joinType attribute
    • getPostJoinFilter

      public Optional<Expression> getPostJoinFilter()
      Specified by:
      getPostJoinFilter in class HashJoin
      Returns:
      The value of the postJoinFilter attribute
    • withExtension

      public final ImmutableHashJoin withExtension(AdvancedExtension value)
      Copy the current immutable object by setting a present value for the optional extension attribute.
      Parameters:
      value - The value for extension
      Returns:
      A modified copy or this if not changed
    • withExtension

      public final ImmutableHashJoin withExtension(Optional<? extends AdvancedExtension> optional)
      Copy the current immutable object by setting an optional value for the extension attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for extension
      Returns:
      A modified copy or this if not changed
    • withRemap

      public final ImmutableHashJoin withRemap(Rel.Remap value)
      Copy the current immutable object by setting a present value for the optional remap attribute.
      Parameters:
      value - The value for remap
      Returns:
      A modified copy or this if not changed
    • withRemap

      public final ImmutableHashJoin withRemap(Optional<? extends Rel.Remap> optional)
      Copy the current immutable object by setting an optional value for the remap attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for remap
      Returns:
      A modified copy or this if not changed
    • withCommonExtension

      public final ImmutableHashJoin withCommonExtension(AdvancedExtension value)
      Copy the current immutable object by setting a present value for the optional commonExtension attribute.
      Parameters:
      value - The value for commonExtension
      Returns:
      A modified copy or this if not changed
    • withCommonExtension

      public final ImmutableHashJoin withCommonExtension(Optional<? extends AdvancedExtension> optional)
      Copy the current immutable object by setting an optional value for the commonExtension attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for commonExtension
      Returns:
      A modified copy or this if not changed
    • withHint

      public final ImmutableHashJoin withHint(Hint value)
      Copy the current immutable object by setting a present value for the optional hint attribute.
      Parameters:
      value - The value for hint
      Returns:
      A modified copy or this if not changed
    • withHint

      public final ImmutableHashJoin withHint(Optional<? extends Hint> optional)
      Copy the current immutable object by setting an optional value for the hint attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for hint
      Returns:
      A modified copy or this if not changed
    • withLeft

      public final ImmutableHashJoin withLeft(Rel value)
      Copy the current immutable object by setting a value for the left attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for left
      Returns:
      A modified copy or the this object
    • withRight

      public final ImmutableHashJoin withRight(Rel value)
      Copy the current immutable object by setting a value for the right attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for right
      Returns:
      A modified copy or the this object
    • withLeftKeys

      public final ImmutableHashJoin withLeftKeys(FieldReference... elements)
      Copy the current immutable object with elements that replace the content of leftKeys.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withLeftKeys

      public final ImmutableHashJoin withLeftKeys(Iterable<? extends FieldReference> elements)
      Copy the current immutable object with elements that replace the content of leftKeys. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of leftKeys elements to set
      Returns:
      A modified copy or this if not changed
    • withRightKeys

      public final ImmutableHashJoin withRightKeys(FieldReference... elements)
      Copy the current immutable object with elements that replace the content of rightKeys.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withRightKeys

      public final ImmutableHashJoin withRightKeys(Iterable<? extends FieldReference> elements)
      Copy the current immutable object with elements that replace the content of rightKeys. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of rightKeys elements to set
      Returns:
      A modified copy or this if not changed
    • withJoinType

      public final ImmutableHashJoin withJoinType(HashJoin.JoinType value)
      Copy the current immutable object by setting a value for the joinType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for joinType
      Returns:
      A modified copy or the this object
    • withPostJoinFilter

      public final ImmutableHashJoin withPostJoinFilter(Expression value)
      Copy the current immutable object by setting a present value for the optional postJoinFilter attribute.
      Parameters:
      value - The value for postJoinFilter
      Returns:
      A modified copy or this if not changed
    • withPostJoinFilter

      public final ImmutableHashJoin withPostJoinFilter(Optional<? extends Expression> optional)
      Copy the current immutable object by setting an optional value for the postJoinFilter attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for postJoinFilter
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableHashJoin that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: extension, remap, commonExtension, hint, left, right, leftKeys, rightKeys, joinType, postJoinFilter.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value HashJoin with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableHashJoin copyOf(HashJoin instance)
      Creates an immutable copy of a HashJoin value. 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 HashJoin instance
    • builder

      public static ImmutableHashJoin.Builder builder()
      Creates a builder for ImmutableHashJoin.
       ImmutableHashJoin.builder()
          .extension(Optional<io.substrait.extension.AdvancedExtension>) // optional extension
          .remap(Optional<io.substrait.relation.Rel.Remap>) // optional remap
          .commonExtension(Optional<io.substrait.extension.AdvancedExtension>) // optional commonExtension
          .hint(Optional<io.substrait.hint.Hint>) // optional hint
          .left(io.substrait.relation.Rel) // required left
          .right(io.substrait.relation.Rel) // required right
          .addLeftKeys|addAllLeftKeys(io.substrait.expression.FieldReference) // leftKeys elements
          .addRightKeys|addAllRightKeys(io.substrait.expression.FieldReference) // rightKeys elements
          .joinType(io.substrait.relation.physical.HashJoin.JoinType) // required joinType
          .postJoinFilter(Optional<io.substrait.expression.Expression>) // optional postJoinFilter
          .build();
       
      Returns:
      A new ImmutableHashJoin builder