Class AllDataFilesTable.AllDataFilesTableScan

  • All Implemented Interfaces:
    TableScan
    Enclosing class:
    AllDataFilesTable

    public static class AllDataFilesTable.AllDataFilesTableScan
    extends java.lang.Object
    • Method Detail

      • useSnapshot

        public TableScan useSnapshot​(long scanSnapshotId)
        Description copied from interface: TableScan
        Create a new TableScan from this scan's configuration that will use the given snapshot by ID.
        Specified by:
        useSnapshot in interface TableScan
        Parameters:
        scanSnapshotId - a snapshot ID
        Returns:
        a new scan based on this with the given snapshot ID
      • asOfTime

        public TableScan asOfTime​(long timestampMillis)
        Description copied from interface: TableScan
        Create a new TableScan from this scan's configuration that will use the most recent snapshot as of the given time in milliseconds.
        Specified by:
        asOfTime in interface TableScan
        Parameters:
        timestampMillis - a timestamp in milliseconds.
        Returns:
        a new scan based on this with the current snapshot at the given time
      • appendsBetween

        public TableScan appendsBetween​(long fromSnapshotId,
                                        long toSnapshotId)
        Description copied from interface: TableScan
        Create a new TableScan to read appended data from fromSnapshotId exclusive to toSnapshotId inclusive.
        Specified by:
        appendsBetween in interface TableScan
        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

        public TableScan appendsAfter​(long fromSnapshotId)
        Description copied from interface: TableScan
        Create a new TableScan to read appended data from fromSnapshotId exclusive to the current snapshot inclusive.
        Specified by:
        appendsAfter in interface TableScan
        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
      • planFiles

        public CloseableIterable<FileScanTask> planFiles()
        Description copied from interface: TableScan
        Plan the files that will be read by this scan.

        Each file has a residual expression that should be applied to filter the file's rows.

        This simple plan returns file scans for each file from position 0 to the file's length. For planning that will combine small files, split large files, and attempt to balance work, use TableScan.planTasks() instead.

        Specified by:
        planFiles in interface TableScan
        Returns:
        an Iterable of file tasks that are required by this scan
      • targetSplitSize

        public long targetSplitSize()
        Description copied from interface: TableScan
        Returns the target split size for this scan.
      • tableSchema

        protected Schema tableSchema()
      • snapshotId

        protected java.lang.Long snapshotId()
      • colStats

        protected boolean colStats()
      • shouldIgnoreResiduals

        protected boolean shouldIgnoreResiduals()
      • selectedColumns

        protected java.util.Collection<java.lang.String> selectedColumns()
      • options

        protected java.util.Map<java.lang.String,​java.lang.String> options()
      • context

        protected org.apache.iceberg.TableScanContext context()
      • table

        public Table table()
        Description copied from interface: TableScan
        Returns the Table from which this scan loads data.
        Specified by:
        table in interface TableScan
        Returns:
        this scan's table
      • option

        public TableScan option​(java.lang.String property,
                                java.lang.String value)
        Description copied from interface: TableScan
        Create a new TableScan from this scan's configuration that will override the Table's behavior based on the incoming pair. Unknown properties will be ignored.
        Specified by:
        option in interface TableScan
        Parameters:
        property - name of the table property to be overridden
        value - value to override with
        Returns:
        a new scan based on this with overridden behavior
      • project

        public TableScan project​(Schema projectedSchema)
        Description copied from interface: TableScan
        Create a new TableScan from this with the schema as its projection.
        Specified by:
        project in interface TableScan
        Parameters:
        projectedSchema - a projection schema
        Returns:
        a new scan based on this with the given projection
      • caseSensitive

        public TableScan caseSensitive​(boolean scanCaseSensitive)
        Description copied from interface: TableScan
        Create a new TableScan from this that, if data columns where selected via TableScan.select(java.util.Collection), controls whether the match to the schema will be done with case sensitivity.
        Specified by:
        caseSensitive in interface TableScan
        Returns:
        a new scan based on this with case sensitivity as stated
      • includeColumnStats

        public TableScan includeColumnStats()
        Description copied from interface: TableScan
        Create a new TableScan from this that loads the column stats with each data file.

        Column stats include: value count, null value count, lower bounds, and upper bounds.

        Specified by:
        includeColumnStats in interface TableScan
        Returns:
        a new scan based on this that loads column stats.
      • select

        public TableScan select​(java.util.Collection<java.lang.String> columns)
        Description copied from interface: TableScan
        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.
        Specified by:
        select in interface TableScan
        Parameters:
        columns - column names from the table's schema
        Returns:
        a new scan based on this with the given projection columns
      • filter

        public TableScan filter​(Expression expr)
        Description copied from interface: TableScan
        Create a new TableScan from the results of this filtered by the Expression.
        Specified by:
        filter in interface TableScan
        Parameters:
        expr - a filter expression
        Returns:
        a new scan based on this with results filtered by the expression
      • ignoreResiduals

        public TableScan ignoreResiduals()
        Description copied from interface: TableScan
        Create a new TableScan from this that applies data filtering to files but not to rows in those files.
        Specified by:
        ignoreResiduals in interface TableScan
        Returns:
        a new scan based on this that does not filter rows in files.
      • planTasks

        public CloseableIterable<CombinedScanTask> planTasks()
        Description copied from interface: TableScan
        Plan the tasks for this scan.

        Tasks created by this method may read partial input files, multiple input files, or both.

        Specified by:
        planTasks in interface TableScan
        Returns:
        an Iterable of tasks for this scan
      • splitLookback

        public int splitLookback()
        Description copied from interface: TableScan
        Returns the split lookback for this scan.
        Specified by:
        splitLookback in interface TableScan
      • splitOpenFileCost

        public long splitOpenFileCost()
        Description copied from interface: TableScan
        Returns the split open file cost for this scan.
        Specified by:
        splitOpenFileCost in interface TableScan
      • schema

        public Schema schema()
        Description copied from interface: TableScan
        Returns this scan's projection Schema.

        If the projection schema was set directly using TableScan.project(Schema), returns that schema.

        If the projection schema was set by calling TableScan.select(Collection), returns a projection schema that includes the selected data fields and any fields used in the filter expression.

        Specified by:
        schema in interface TableScan
        Returns:
        this scan's projection schema
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object