Class ImmutableVirtualTableScan

All Implemented Interfaces:
HasExtension, Rel

public final class ImmutableVirtualTableScan extends VirtualTableScan
Immutable implementation of VirtualTableScan.

Use the builder to create immutable instances: ImmutableVirtualTableScan.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
    • getInitialSchema

      public NamedStruct getInitialSchema()
      Specified by:
      getInitialSchema in class AbstractReadRel
      Returns:
      The value of the initialSchema attribute
    • getFilter

      public Optional<Expression> getFilter()
      Specified by:
      getFilter in class AbstractReadRel
      Returns:
      The value of the filter attribute
    • getBestEffortFilter

      public Optional<Expression> getBestEffortFilter()
      Specified by:
      getBestEffortFilter in class AbstractReadRel
      Returns:
      The value of the bestEffortFilter attribute
    • getRows

      public List<Expression.NestedStruct> getRows()
      Specified by:
      getRows in class VirtualTableScan
      Returns:
      The value of the rows attribute
    • withExtension

      public final ImmutableVirtualTableScan 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 ImmutableVirtualTableScan 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 ImmutableVirtualTableScan 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 ImmutableVirtualTableScan 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 ImmutableVirtualTableScan 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 ImmutableVirtualTableScan 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 ImmutableVirtualTableScan 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 ImmutableVirtualTableScan 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
    • withInitialSchema

      public final ImmutableVirtualTableScan withInitialSchema(NamedStruct value)
      Copy the current immutable object by setting a value for the initialSchema attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for initialSchema
      Returns:
      A modified copy or the this object
    • withFilter

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

      public final ImmutableVirtualTableScan withFilter(Optional<? extends Expression> optional)
      Copy the current immutable object by setting an optional value for the filter 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 filter
      Returns:
      A modified copy or this if not changed
    • withBestEffortFilter

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

      public final ImmutableVirtualTableScan withBestEffortFilter(Optional<? extends Expression> optional)
      Copy the current immutable object by setting an optional value for the bestEffortFilter 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 bestEffortFilter
      Returns:
      A modified copy or this if not changed
    • withRows

      public final ImmutableVirtualTableScan withRows(Expression.NestedStruct... elements)
      Copy the current immutable object with elements that replace the content of rows.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withRows

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

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

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

      public static ImmutableVirtualTableScan copyOf(VirtualTableScan instance)
      Creates an immutable copy of a VirtualTableScan 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 VirtualTableScan instance
    • builder

      public static ImmutableVirtualTableScan.Builder builder()
      Creates a builder for ImmutableVirtualTableScan.
       ImmutableVirtualTableScan.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
          .initialSchema(io.substrait.type.NamedStruct) // required initialSchema
          .filter(Optional<io.substrait.expression.Expression>) // optional filter
          .bestEffortFilter(Optional<io.substrait.expression.Expression>) // optional bestEffortFilter
          .addRows|addAllRows(io.substrait.expression.Expression.NestedStruct) // rows elements
          .build();
       
      Returns:
      A new ImmutableVirtualTableScan builder