Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
dbe3c19
update methods and testS
TimothyW553 Nov 12, 2025
ac042af
delete workspace
TimothyW553 Nov 12, 2025
9ca1793
delete
TimothyW553 Nov 12, 2025
e3fcc41
change to catalogtable
TimothyW553 Nov 11, 2025
776ed69
add tests
TimothyW553 Nov 12, 2025
418b9bd
fmt
TimothyW553 Nov 12, 2025
e926066
test fix
TimothyW553 Nov 13, 2025
d443640
storage props
TimothyW553 Nov 14, 2025
d1684da
merge props
TimothyW553 Nov 17, 2025
0ca9b4c
address comments
TimothyW553 Nov 17, 2025
ee36547
remove private method test
TimothyW553 Nov 18, 2025
906643b
null check for storage properties
TimothyW553 Nov 18, 2025
71c62f3
Restore UC connection utils after rebase
TimothyW553 Dec 2, 2025
e524c60
clean up...
TimothyW553 Dec 2, 2025
b79ff29
Restore UC connection info utils and add SparkUnityCatalogUtils suite
TimothyW553 Dec 2, 2025
816e596
Update tests
TimothyW553 Dec 2, 2025
a5d745a
spark
TimothyW553 Dec 2, 2025
9d313c9
Clean up test utils and refactor
TimothyW553 Dec 2, 2025
1ba9177
revert DeltaSQLConfV2.scala
TimothyW553 Dec 2, 2025
c6d7e67
remove npe tests
TimothyW553 Dec 2, 2025
fc614cb
remove more npe
TimothyW553 Dec 2, 2025
2d333d3
Centralize utils
TimothyW553 Dec 4, 2025
7dc4549
fmt
TimothyW553 Dec 4, 2025
b2e39c8
FMT
TimothyW553 Dec 4, 2025
0423386
Address comments - remove unecessary wrappers and add logging
TimothyW553 Dec 4, 2025
7717995
Address comments - remove unecessary wrappers and add logging
TimothyW553 Dec 4, 2025
9cad0ba
Add wrapper for map
TimothyW553 Dec 4, 2025
a294801
use SharedSparkSession
TimothyW553 Dec 4, 2025
f43a198
fix tests
TimothyW553 Dec 4, 2025
d4f0c0f
fix tests
TimothyW553 Dec 4, 2025
0a58d48
annotate constant params
TimothyW553 Dec 5, 2025
94303b3
annotate constant params
TimothyW553 Dec 5, 2025
4275b56
Rename and follow naming conventions
TimothyW553 Dec 8, 2025
ad25296
Rename and follow naming conventions
TimothyW553 Dec 8, 2025
254b3f5
update context
TimothyW553 Dec 9, 2025
07f3b5b
rename base utils
TimothyW553 Dec 10, 2025
2bee750
Update tests
TimothyW553 Dec 2, 2025
64e5cda
Clean up test utils and refactor
TimothyW553 Dec 2, 2025
bb9fe06
Centralize utils
TimothyW553 Dec 4, 2025
1615a27
FMT
TimothyW553 Dec 4, 2025
c069296
Address comments - remove unecessary wrappers and add logging
TimothyW553 Dec 4, 2025
f4dab6c
Address comments - remove unecessary wrappers and add logging
TimothyW553 Dec 4, 2025
8588477
fix tests
TimothyW553 Dec 4, 2025
20c631b
annotate constant params
TimothyW553 Dec 5, 2025
f032bc4
Rename and follow naming conventions
TimothyW553 Dec 8, 2025
15ddabf
Rename and follow naming conventions
TimothyW553 Dec 8, 2025
ca28e0d
wireframe
TimothyW553 Dec 9, 2025
984e458
rename to UCManagedTableSnapshotManager
TimothyW553 Dec 10, 2025
63e0f90
reword javadocs
TimothyW553 Dec 10, 2025
094db22
[Kernel-Spark][DSv2] Implement UCManagedSnapshotManager operations us…
TimothyW553 Dec 9, 2025
10da4a2
annotate constants
TimothyW553 Dec 9, 2025
043f3c1
scala and java tests
TimothyW553 Dec 10, 2025
2767fec
scala and java tests
TimothyW553 Dec 10, 2025
0c22e3a
Remove engine construction and update to being passed in as a param
TimothyW553 Dec 10, 2025
7a36ab2
Remove tests for impl
TimothyW553 Dec 10, 2025
197efc8
unformat
TimothyW553 Dec 11, 2025
7f40d83
remove impl oops
TimothyW553 Dec 11, 2025
0b58868
constructor
TimothyW553 Dec 11, 2025
dfdfdf0
Merge branch 'master' into stack/snapshotmanager-wireframe
TimothyW553 Dec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ lazy val sparkV1Filtered = (project in file("spark-v1-filtered"))
lazy val sparkV2 = (project in file("kernel-spark"))
.dependsOn(sparkV1Filtered)
.dependsOn(kernelDefaults)
.dependsOn(kernelUnityCatalog % "compile->compile;test->test")
.dependsOn(goldenTables % "test")
.settings(
name := "delta-spark-v2",
Expand Down
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");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* Utility class for extracting Unity Catalog table information from Spark catalog metadata.
*
* <p>This class isolates Spark dependencies, allowing {@link UCManagedSnapshotManager} to be
* <p>This class isolates Spark dependencies, allowing {@link UCManagedTableSnapshotManager} to be
* created without Spark if table info is provided directly via {@link UCTableInfo}.
*/
public final class UCUtils {
Expand Down
Loading