Interface TableScan

    • Method Detail

      • table

        Table table()
        Returns the Table from which this scan loads data.
        Returns:
        this scan's table
      • useSnapshot

        TableScan useSnapshot​(long snapshotId)
        Create a new TableScan from this scan's configuration that will use the given snapshot by ID.
        Parameters:
        snapshotId - a snapshot ID
        Returns:
        a new scan based on this with the given snapshot ID
        Throws:
        java.lang.IllegalArgumentException - if the snapshot cannot be found
      • asOfTime

        TableScan asOfTime​(long timestampMillis)
        Create a new TableScan from this scan's configuration that will use the most recent snapshot as of the given time in milliseconds.
        Parameters:
        timestampMillis - a timestamp in milliseconds.
        Returns:
        a new scan based on this with the current snapshot at the given time
        Throws:
        java.lang.IllegalArgumentException - if the snapshot cannot be found
      • select

        default TableScan select​(java.lang.String... columns)
        Create a new TableScan from this that will read the given data columns. This produces an expected schema that includes all fields that are either selected or used by this scan's filter expression.
        Parameters:
        columns - column names from the table's schema
        Returns:
        a new scan based on this with the given projection columns
      • filter

        Expression filter()
        Returns this scan's filter Expression.
        Returns:
        this scan's filter expression
      • appendsBetween

        default TableScan appendsBetween​(long fromSnapshotId,
                                         long toSnapshotId)
        Create a new TableScan to read appended data from fromSnapshotId exclusive to toSnapshotId inclusive.
        Parameters:
        fromSnapshotId - the last snapshot id read by the user, exclusive
        toSnapshotId - read append data up to this snapshot id
        Returns:
        a table scan which can read append data from fromSnapshotId exclusive and up to toSnapshotId inclusive
      • appendsAfter

        default TableScan appendsAfter​(long fromSnapshotId)
        Create a new TableScan to read appended data from fromSnapshotId exclusive to the current snapshot inclusive.
        Parameters:
        fromSnapshotId - - the last snapshot id read by the user, exclusive
        Returns:
        a table scan which can read append data from fromSnapshotId exclusive and up to current snapshot inclusive
      • snapshot

        Snapshot snapshot()
        Returns the Snapshot that will be used by this scan.

        If the snapshot was not configured using asOfTime(long) or useSnapshot(long), the current table snapshot will be used.

        Returns:
        the Snapshot this scan will use
      • isCaseSensitive

        boolean isCaseSensitive()
        Returns whether this scan should apply column name case sensitiveness as per Scan.caseSensitive(boolean).
        Returns:
        true if case sensitive, false otherwise.