Skip to content

Conversation

scottsand-db
Copy link
Collaborator

@scottsand-db scottsand-db commented Jul 15, 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

#4814 introduced new TransactionV2, Committer, CommitContext, etc APIs.

This PR now adds the abilities for Engines to inject into Kernel the actual Committer.

This PR also includes a no-op Default committer implementation that validates that it is not interacting with catalog-managed tables. We do this because: ResolvedTable does not return an Optional committer, but rather just a committer. So we need to give it something in the case that no committer was provided to the table builder.

How was this patch tested?

New UTs.

Does this PR introduce any user-facing changes?

New .withCommitter API

@scottsand-db scottsand-db changed the title add new API to set committer; create simple default committer; simple tests [Kernel] [CatalogManaged] Add new builder .withCommitter API; Create DefaultCommitter skeleton Jul 15, 2025
@scottsand-db scottsand-db self-assigned this Jul 15, 2025
@scottsand-db scottsand-db requested a review from emkornfield July 15, 2025 23:46
import io.delta.kernel.internal.tablefeatures.TableFeatures;
import io.delta.kernel.utils.CloseableIterator;

public class DefaultFileSystemManagedTableOnlyCommitter implements Committer {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: This will get more complex later on as we implement it properly

throw new UnsupportedOperationException("Default Committer not yet implemented");
}

private void validateProtocol(Protocol protocol) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentionally included in this PR? it looks a bit wired that we do some check then throw unsupported error. (but ok with that given DefaultFileSystemManagedTableOnlyCommitter will be implemented shortly)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! Yup, intentionally included.

I think it's important for us to all agree from the get go that the default committer should not be able to write into catalog managed tables.

Copy link
Collaborator

@allisonport-db allisonport-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scottsand-db scottsand-db force-pushed the stack/kernel_catalog_managed_writes_get_committer branch from 0d0d475 to 9e7062d Compare July 29, 2025 20:09
@scottsand-db scottsand-db merged commit 97733c2 into delta-io:master Jul 29, 2025
22 checks passed
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.

4 participants