Class CommitRangeImpl
Object
io.delta.kernel.internal.commitrange.CommitRangeImpl
- All Implemented Interfaces:
CommitRange
Implementation of
CommitRange.-
Constructor Summary
ConstructorsConstructorDescriptionCommitRangeImpl(Path dataPath, CommitRangeBuilder.CommitBoundary startBoundary, Optional<CommitRangeBuilder.CommitBoundary> endBoundaryOpt, long startVersion, long endVersion, List<ParsedDeltaData> deltas) -
Method Summary
Modifier and TypeMethodDescriptiongetActions(Engine engine, Snapshot startSnapshot, Set<DeltaLogActionUtils.DeltaAction> actionSet) Returns an iterator of the requested actions for the commits in this commit range.getCommitActions(Engine engine, Snapshot startSnapshot, Set<DeltaLogActionUtils.DeltaAction> actionSet) Returns an iterator of commits in this commit range, where each commit is represented as aCommitActionsobject.longReturns the ending version number (inclusive) of this commit range.Returns the original query boundary used to define the end boundary of this commit range, if available.Returns the original query boundary used to define the start boundary of this commit range.longReturns the starting version number (inclusive) of this commit range.
-
Constructor Details
-
CommitRangeImpl
public CommitRangeImpl(Path dataPath, CommitRangeBuilder.CommitBoundary startBoundary, Optional<CommitRangeBuilder.CommitBoundary> endBoundaryOpt, long startVersion, long endVersion, List<ParsedDeltaData> deltas)
-
-
Method Details
-
getStartVersion
public long getStartVersion()Description copied from interface:CommitRangeReturns the starting version number (inclusive) of this commit range.- Specified by:
getStartVersionin interfaceCommitRange- Returns:
- the starting version number of the commit range
-
getEndVersion
public long getEndVersion()Description copied from interface:CommitRangeReturns the ending version number (inclusive) of this commit range.- Specified by:
getEndVersionin interfaceCommitRange- Returns:
- the ending version number of the commit range
-
getQueryStartBoundary
Description copied from interface:CommitRangeReturns 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:
getQueryStartBoundaryin interfaceCommitRange- Returns:
- the start boundary for this commit range
-
getQueryEndBoundary
Description copied from interface:CommitRangeReturns 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:
getQueryEndBoundaryin interfaceCommitRange- Returns:
- an
Optionalcontaining the end boundary, or empty if the range was created with default end parameters (latest version)
-
getDeltaFiles
-
getActions
public CloseableIterator<ColumnarBatch> getActions(Engine engine, Snapshot startSnapshot, Set<DeltaLogActionUtils.DeltaAction> actionSet) Description copied from interface:CommitRangeReturns 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:
getActionsin interfaceCommitRange- Parameters:
engine- theEngineto use for reading the Delta log filesstartSnapshot- the snapshot for startVersion, required to ensure the table is readable by Kernel at startVersionactionSet- the set of action types to include in the results. Only actions of these types will be returned in the iterator- Returns:
- a
CloseableIteratorover 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:CommitRangeReturns an iterator of commits in this commit range, where each commit is represented as aCommitActionsobject.- Specified by:
getCommitActionsin interfaceCommitRange- Parameters:
engine- theEngineto use for reading the Delta log filesstartSnapshot- the snapshot for startVersion, required to ensure the table is readable by Kernel at startVersionactionSet- 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
CloseableIteratoroverCommitActions, one per commit version in this range
-