Skip to content

[Kernel] [CatalogManaged] New Transaction and Committer etc. APIs #4814

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

Conversation

scottsand-db
Copy link
Collaborator

@scottsand-db scottsand-db commented Jun 24, 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

This PR adds new Transaction and Committer etc. APIs.

How was this patch tested?

Just new APIs.

Does this PR introduce any user-facing changes?

Yes.

@scottsand-db scottsand-db changed the title done first pass [Kernel] [CatalogManaged] Committer, CommitPayload, CommitResponse, CommitFailedException APIs Jun 24, 2025
@scottsand-db scottsand-db self-assigned this Jun 24, 2025
* The {@link Protocol} that was read at the beginning of the commit. Empty if a new table is
* being created.
*/
public final Optional<Protocol> readProtocolOpt;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remind me why we need the old/new p and ms?

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! For example, to detect that the catalogManaged table feature has been enabled on the table.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

And, certainly, you want the new Protocol and Metadata so you can send that to the catalog, and then it always knows what's the latets P & M, and it can give that back on the next read request to efficiently construct a ResolvedTable without having to go to the file system to resolve the latest P & M

@scottsand-db scottsand-db force-pushed the stack/kernel_catalog_managed_writes_1 branch from b603c47 to 072ede5 Compare June 25, 2025 21:18
@scottsand-db scottsand-db mentioned this pull request Jun 25, 2025
5 tasks
@scottsand-db scottsand-db force-pushed the stack/kernel_catalog_managed_writes_1 branch from 76c689f to 75bae78 Compare June 28, 2025 00:31
This was referenced Jul 2, 2025
@scottsand-db scottsand-db changed the title [Kernel] [CatalogManaged] Committer, CommitPayload, CommitResponse, CommitFailedException APIs [Kernel] [CatalogManaged] New Transaction and Committer etc. APIs Jul 9, 2025
@scottsand-db scottsand-db requested a review from emkornfield July 9, 2025 23:27
Copy link
Collaborator

@raveeram-db raveeram-db left a comment

Choose a reason for hiding this comment

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

looks good! Just a nit.

@scottsand-db scottsand-db merged commit d10363f into delta-io:master Jul 14, 2025
22 checks passed
scottsand-db added a commit that referenced this pull request Jul 29, 2025
…DefaultCommitter skeleton (#4936)

## 🥞 Stacked PR
Use this [link](https://github.com/delta-io/delta/pull/4936/files) to
review incremental changes.
-
[**stack/kernel_catalog_managed_writes_get_committer**](#4936)
[[Files changed](https://github.com/delta-io/delta/pull/4936/files)]

---------
<!--
Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
https://github.com/delta-io/delta/blob/master/CONTRIBUTING.md
2. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]
Your PR title ...'.
  3. Be sure to keep the PR description updated to reflect all changes.
  4. Please write your PR title to summarize what this PR proposes.
5. If possible, provide a concise example to reproduce the issue for a
faster review.
6. If applicable, include the corresponding issue number in the PR title
and link it in the body.
-->

#### Which Delta project/connector is this regarding?

- [ ] Spark
- [ ] Standalone
- [ ] Flink
- [X] 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
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.

7 participants