Package io.delta.kernel.internal
Class TableChangesUtils
Object
io.delta.kernel.internal.TableChangesUtils
Utility class for table changes operations.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ColumnarBatchaddVersionAndTimestampColumns(Engine engine, ColumnarBatch batch, long version, long timestamp) Adds version and timestamp columns to a columnar batch.static CloseableIterator<ColumnarBatch> flattenCommitsAndAddMetadata(Engine engine, CloseableIterator<CommitActions> commits) Flattens an iterator of CommitActions into an iterator of ColumnarBatch, adding version and timestamp columns to each batch.
-
Field Details
-
VERSION_COLUMN_NAME
Column name for the version metadata column added to getActions results.- See Also:
-
TIMESTAMP_COLUMN_NAME
Column name for the timestamp metadata column added to getActions results.- See Also:
-
-
Method Details
-
addVersionAndTimestampColumns
public static ColumnarBatch addVersionAndTimestampColumns(Engine engine, ColumnarBatch batch, long version, long timestamp) Adds version and timestamp columns to a columnar batch.The version and timestamp columns are added as the first two columns in the batch.
- Parameters:
engine- the engine for expression evaluationbatch- the original batchversion- the version value to addtimestamp- the timestamp value to add- Returns:
- a new batch with version and timestamp columns prepended
-
flattenCommitsAndAddMetadata
public static CloseableIterator<ColumnarBatch> flattenCommitsAndAddMetadata(Engine engine, CloseableIterator<CommitActions> commits) Flattens an iterator of CommitActions into an iterator of ColumnarBatch, adding version and timestamp columns to each batch.- Parameters:
engine- the engine for expression evaluationcommits- the iterator of CommitActions to flatten- Returns:
- an iterator of ColumnarBatch with version and timestamp columns added
-