Skip to content

Conversation

@TimothyW553
Copy link
Contributor

@TimothyW553 TimothyW553 commented Nov 23, 2025

🥞 Stacked PR

Use this link to review incremental changes.


Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

How was this patch tested?

Does this PR introduce any user-facing changes?

…nt interface

This introduces the core contracts for catalog-managed commits:
- CatalogWithManagedCommits: Trait for catalogs to declare managed commit support
- ManagedCommitClient: Generic interface for snapshot operations

These contracts enable catalog-agnostic architecture where catalogs
(Unity Catalog, Glue, Polaris) can provide their own implementations
without kernel-spark knowing specific catalog details.
Provides in-memory implementation that proves interface is complete
and usable without actual catalog dependencies.
Move the trait from spark module to kernel-spark module to fix
compilation error. The spark module doesn't depend on kernel-spark,
so the trait needs to live in kernel-spark where it can directly
reference ManagedCommitClient.

The trait can still be implemented by catalog classes in the spark
module or other modules.
Apply linter/formatter changes to Java files.
- Replace JUnit 4 with JUnit 5 (Jupiter) annotations
- Remove Mockito dependency, use simple FakeSnapshot instead
- Simplify tests to 3 focused test cases
- Tests now compile with kernel-spark dependencies
…esign

Use minimal SnapshotStub that only implements getVersion() - the only
method actually used by MockManagedCommitClient.

Test coverage:
- Add and retrieve snapshots
- Latest version calculation
- Version existence checking
- Empty table handling
- Error cases (table not found, version not found)
- Close clearing state

All other Snapshot methods throw UnsupportedOperationException since
they're not needed for testing the mock's storage/retrieval logic.
Add adapter that wraps UC-specific UCCatalogManagedClient to implement
the generic ManagedCommitClient interface.

This adapter:
- Lives in kernel-spark module to access both generic and UC interfaces
- Delegates getSnapshot() to UCCatalogManagedClient.loadSnapshot()
- Implements versionExists() and getLatestVersion() using UC client
- Isolates UC-specific logic while providing generic API

Also add sparkV2 dependency on kernelUnityCatalog to access UC classes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant