Class ImmutableExpression.ScalarSubquery

java.lang.Object
io.substrait.expression.Expression.ScalarSubquery
io.substrait.expression.ImmutableExpression.ScalarSubquery
All Implemented Interfaces:
Expression, Expression.Subquery, FunctionArg
Enclosing class:
ImmutableExpression

public static final class ImmutableExpression.ScalarSubquery extends Expression.ScalarSubquery
Immutable implementation of Expression.ScalarSubquery.

Use the builder to create immutable instances: ImmutableExpression.ScalarSubquery.builder().

  • Method Details

    • getType

      public Type getType()
      Returns:
      The value of the type attribute
    • input

      public Rel input()
      Specified by:
      input in class Expression.ScalarSubquery
      Returns:
      The value of the input attribute
    • withType

      public final ImmutableExpression.ScalarSubquery withType(Type value)
      Copy the current immutable object by setting a value for the type attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy or the this object
    • withInput

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

      public boolean equals(Object another)
      This instance is equal to all instances of ScalarSubquery 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: type, input.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      Creates an immutable copy of a Expression.ScalarSubquery 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 ScalarSubquery instance
    • builder

      Creates a builder for ScalarSubquery.
       ImmutableExpression.ScalarSubquery.builder()
          .type(io.substrait.type.Type) // required type
          .input(io.substrait.relation.Rel) // required input
          .build();
       
      Returns:
      A new ScalarSubquery builder