Class CommitRangeImpl

Object
io.delta.kernel.internal.commitrange.CommitRangeImpl
All Implemented Interfaces:
CommitRange

public class CommitRangeImpl extends Object implements CommitRange
Implementation of CommitRange.
  • Constructor Details

  • Method Details

    • getStartVersion

      public long getStartVersion()
      Description copied from interface: CommitRange
      Returns the starting version number (inclusive) of this commit range.
      Specified by:
      getStartVersion in interface CommitRange
      Returns:
      the starting version number of the commit range
    • getEndVersion

      public long getEndVersion()
      Description copied from interface: CommitRange
      Returns the ending version number (inclusive) of this commit range.
      Specified by:
      getEndVersion in interface CommitRange
      Returns:
      the ending version number of the commit range
    • getQueryStartBoundary

      public CommitRangeBuilder.CommitBoundary getQueryStartBoundary()
      Description copied from interface: CommitRange
      Returns the original query boundary used to define the start boundary of this commit range.

      The boundary indicates whether the range was defined using a specific version number or a timestamp.

      Specified by:
      getQueryStartBoundary in interface CommitRange
      Returns:
      the start boundary for this commit range
    • getQueryEndBoundary

      public Optional<CommitRangeBuilder.CommitBoundary> getQueryEndBoundary()
      Description copied from interface: CommitRange
      Returns the original query boundary used to define the end boundary of this commit range, if available.

      The boundary indicates whether the range was defined using a specific version number or a timestamp.

      Specified by:
      getQueryEndBoundary in interface CommitRange
      Returns:
      an Optional containing the end boundary, or empty if the range was created with default end parameters (latest version)
    • getDeltaFiles

      @VisibleForTesting public List<FileStatus> getDeltaFiles()
    • getActions

      public CloseableIterator<ColumnarBatch> getActions(Engine engine, Snapshot startSnapshot, Set<DeltaLogActionUtils.DeltaAction> actionSet)
      Description copied from interface: CommitRange
      Returns an iterator of the requested actions for the commits in this commit range.

      For the returned columnar batches:

      • Each row within the same batch is guaranteed to have the same commit version
      • The batch commit versions are monotonically increasing
      • The top-level columns include "version", "timestamp", and the actions requested in actionSet. "version" and "timestamp" are the first and second columns in the schema, respectively. The remaining columns are based on the actions requested and each have the schema found in DeltaAction.schema.

      The iterator must be closed after use to release any underlying resources.

      Specified by:
      getActions in interface CommitRange
      Parameters:
      engine - the Engine to use for reading the Delta log files
      startSnapshot - the snapshot for startVersion, required to ensure the table is readable by Kernel at startVersion
      actionSet - the set of action types to include in the results. Only actions of these types will be returned in the iterator
      Returns:
      a CloseableIterator over columnar batches containing the requested actions within this commit range
    • getCommitActions

      public CloseableIterator<CommitActions> getCommitActions(Engine engine, Snapshot startSnapshot, Set<DeltaLogActionUtils.DeltaAction> actionSet)
      Description copied from interface: CommitRange
      Returns an iterator of commits in this commit range, where each commit is represented as a CommitActions object.
      Specified by:
      getCommitActions in interface CommitRange
      Parameters:
      engine - the Engine to use for reading the Delta log files
      startSnapshot - the snapshot for startVersion, required to ensure the table is readable by Kernel at startVersion
      actionSet - the set of action types to include in the results. Only actions of these types will be returned in each commit's actions iterator
      Returns:
      a CloseableIterator over CommitActions, one per commit version in this range