-
Notifications
You must be signed in to change notification settings - Fork 2k
[Kernel-Spark][DSv2] Wireframe for UCManagedSnapshotManager #5655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tdas
merged 60 commits into
delta-io:master
from
TimothyW553:stack/snapshotmanager-wireframe
Dec 15, 2025
+93
−1
Merged
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
dbe3c19
update methods and testS
TimothyW553 ac042af
delete workspace
TimothyW553 9ca1793
delete
TimothyW553 e3fcc41
change to catalogtable
TimothyW553 776ed69
add tests
TimothyW553 418b9bd
fmt
TimothyW553 e926066
test fix
TimothyW553 d443640
storage props
TimothyW553 d1684da
merge props
TimothyW553 0ca9b4c
address comments
TimothyW553 ee36547
remove private method test
TimothyW553 906643b
null check for storage properties
TimothyW553 71c62f3
Restore UC connection utils after rebase
TimothyW553 e524c60
clean up...
TimothyW553 b79ff29
Restore UC connection info utils and add SparkUnityCatalogUtils suite
TimothyW553 816e596
Update tests
TimothyW553 a5d745a
spark
TimothyW553 9d313c9
Clean up test utils and refactor
TimothyW553 1ba9177
revert DeltaSQLConfV2.scala
TimothyW553 c6d7e67
remove npe tests
TimothyW553 fc614cb
remove more npe
TimothyW553 2d333d3
Centralize utils
TimothyW553 7dc4549
fmt
TimothyW553 b2e39c8
FMT
TimothyW553 0423386
Address comments - remove unecessary wrappers and add logging
TimothyW553 7717995
Address comments - remove unecessary wrappers and add logging
TimothyW553 9cad0ba
Add wrapper for map
TimothyW553 a294801
use SharedSparkSession
TimothyW553 f43a198
fix tests
TimothyW553 d4f0c0f
fix tests
TimothyW553 0a58d48
annotate constant params
TimothyW553 94303b3
annotate constant params
TimothyW553 4275b56
Rename and follow naming conventions
TimothyW553 ad25296
Rename and follow naming conventions
TimothyW553 254b3f5
update context
TimothyW553 07f3b5b
rename base utils
TimothyW553 2bee750
Update tests
TimothyW553 64e5cda
Clean up test utils and refactor
TimothyW553 bb9fe06
Centralize utils
TimothyW553 1615a27
FMT
TimothyW553 c069296
Address comments - remove unecessary wrappers and add logging
TimothyW553 f4dab6c
Address comments - remove unecessary wrappers and add logging
TimothyW553 8588477
fix tests
TimothyW553 20c631b
annotate constant params
TimothyW553 f032bc4
Rename and follow naming conventions
TimothyW553 15ddabf
Rename and follow naming conventions
TimothyW553 ca28e0d
wireframe
TimothyW553 984e458
rename to UCManagedTableSnapshotManager
TimothyW553 63e0f90
reword javadocs
TimothyW553 094db22
[Kernel-Spark][DSv2] Implement UCManagedSnapshotManager operations us…
TimothyW553 10da4a2
annotate constants
TimothyW553 043f3c1
scala and java tests
TimothyW553 2767fec
scala and java tests
TimothyW553 0c22e3a
Remove engine construction and update to being passed in as a param
TimothyW553 7a36ab2
Remove tests for impl
TimothyW553 197efc8
unformat
TimothyW553 7f40d83
remove impl oops
TimothyW553 0b58868
constructor
TimothyW553 dfdfdf0
Merge branch 'master' into stack/snapshotmanager-wireframe
TimothyW553 db11076
Merge branch 'master' into stack/snapshotmanager-wireframe
TimothyW553 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
91 changes: 91 additions & 0 deletions
91
.../main/java/io/delta/kernel/spark/snapshot/unitycatalog/UCManagedTableSnapshotManager.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| /* | ||
| * Copyright (2025) The Delta Lake Project Authors. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package io.delta.kernel.spark.snapshot.unitycatalog; | ||
|
|
||
| import static java.util.Objects.requireNonNull; | ||
|
|
||
| import io.delta.kernel.CommitRange; | ||
| import io.delta.kernel.Snapshot; | ||
| import io.delta.kernel.engine.Engine; | ||
| import io.delta.kernel.internal.DeltaHistoryManager; | ||
| import io.delta.kernel.spark.snapshot.DeltaSnapshotManager; | ||
| import io.delta.kernel.unitycatalog.UCCatalogManagedClient; | ||
| import java.util.Optional; | ||
|
|
||
| /** | ||
| * Snapshot manager for Unity Catalog managed tables. | ||
| * | ||
| * <p>Used for tables with the catalog-managed commit feature enabled. Unity Catalog serves as the | ||
| * source of truth for the table's commit history. | ||
| */ | ||
| public class UCManagedTableSnapshotManager implements DeltaSnapshotManager { | ||
|
|
||
| private final UCCatalogManagedClient ucCatalogManagedClient; | ||
| private final String tableId; | ||
| private final String tablePath; | ||
| private final Engine engine; | ||
|
|
||
| /** | ||
| * Creates a new UCManagedTableSnapshotManager. | ||
| * | ||
| * @param ucCatalogManagedClient the UC client for catalog-managed operations | ||
| * @param tableInfo the UC table information (tableId, tablePath, etc.) | ||
| * @param engine the Kernel engine for table operations | ||
| */ | ||
| public UCManagedTableSnapshotManager( | ||
| UCCatalogManagedClient ucCatalogManagedClient, UCTableInfo tableInfo, Engine engine) { | ||
| this.ucCatalogManagedClient = | ||
| requireNonNull(ucCatalogManagedClient, "ucCatalogManagedClient is null"); | ||
| requireNonNull(tableInfo, "tableInfo is null"); | ||
| this.tableId = tableInfo.getTableId(); | ||
| this.tablePath = tableInfo.getTablePath(); | ||
| this.engine = requireNonNull(engine, "engine is null"); | ||
| } | ||
|
|
||
| @Override | ||
| public Snapshot loadLatestSnapshot() { | ||
| throw new UnsupportedOperationException( | ||
| "UCManagedTableSnapshotManager.loadLatestSnapshot is not yet implemented"); | ||
| } | ||
|
|
||
| @Override | ||
| public Snapshot loadSnapshotAt(long version) { | ||
| throw new UnsupportedOperationException( | ||
| "UCManagedTableSnapshotManager.loadSnapshotAt is not yet implemented"); | ||
| } | ||
|
|
||
| @Override | ||
| public DeltaHistoryManager.Commit getActiveCommitAtTime( | ||
| long timestampMillis, | ||
| boolean canReturnLastCommit, | ||
| boolean mustBeRecreatable, | ||
| boolean canReturnEarliestCommit) { | ||
| throw new UnsupportedOperationException( | ||
| "UCManagedTableSnapshotManager.getActiveCommitAtTime is not yet implemented"); | ||
| } | ||
|
|
||
| @Override | ||
| public void checkVersionExists(long version, boolean mustBeRecreatable, boolean allowOutOfRange) { | ||
| throw new UnsupportedOperationException( | ||
| "UCManagedTableSnapshotManager.checkVersionExists is not yet implemented"); | ||
| } | ||
|
|
||
| @Override | ||
| public CommitRange getTableChanges(Engine engine, long startVersion, Optional<Long> endVersion) { | ||
| throw new UnsupportedOperationException( | ||
| "UCManagedTableSnapshotManager.getTableChanges is not yet implemented"); | ||
| } | ||
| } |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooooh.. the first integration between UC-Kernel + Spark! yay!