Remove redundant getSnapshotAt calls per commit#791
Open
brishi19791 wants to merge 8 commits intoapache:mainfrom
Open
Remove redundant getSnapshotAt calls per commit#791brishi19791 wants to merge 8 commits intoapache:mainfrom
brishi19791 wants to merge 8 commits intoapache:mainfrom
Conversation
Contributor
Thats awesome, thanks for adding the perf improvement. It might be a good idea to add a test (either here or a follow up PR) to verify that the entire conversion process should only read the DeltaLog once. |
kevinjqliu
reviewed
Feb 1, 2026
xtable-core/src/main/java/org/apache/xtable/delta/DeltaConversionSource.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Kevin Liu <kevinjqliu@users.noreply.github.com>
ashvina
approved these changes
Feb 5, 2026
Contributor
ashvina
left a comment
There was a problem hiding this comment.
Thanks for the improvement @brishi19791
LGTM with minor suggestions. IMO, this change doesn’t just remove redundant DeltaLog/snapshot lookups, it anchors all derived state to a single, known Snapshot, which eliminates subtle race windows.
xtable-core/src/main/java/org/apache/xtable/delta/DeltaTableExtractor.java
Show resolved
Hide resolved
ashvina
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes redundant DeltaLog.getSnapshotAt(version) calls in the Delta source conversion path that were happening for every commit. getSnapshotAt can internally trigger an expensive Spark job and associated network I/O (e.g., listing/reading Delta log metadata from remote storage) to resolve the snapshot for a given version. We now fetch the snapshot once per commit/version and reuse it to construct the InternalTable (via a DeltaTableExtractor.table(Snapshot, tableName) overload), instead of re-resolving the same snapshot multiple times.
Impact