Skip to content

[PROTOCOL RFC] Catalog-managed Tables#4382

Merged
scottsand-db merged 12 commits into
delta-io:masterfrom
scottsand-db:catalog_owned_protocol_rfc
Jun 6, 2025
Merged

[PROTOCOL RFC] Catalog-managed Tables#4382
scottsand-db merged 12 commits into
delta-io:masterfrom
scottsand-db:catalog_owned_protocol_rfc

Conversation

@scottsand-db

@scottsand-db scottsand-db commented Apr 7, 2025

Copy link
Copy Markdown
Collaborator

This PR

  1. Adds the new catalogManaged table feature protocol RFC for issue [PROTOCOL RFC] Catalog-managed Tables #4381
  2. Formally rejects the previous Coordinated-Commits RFC ([Protocol Change Request] Delta Coordinated Commits #2598)

For details about why we are proposing this RFC and why we are rejecting the Coordinated Commits RFC, please see the tracking issue #4381

Design doc: Design Doc: Catalog-Managed Delta Table Feature

@scottsand-db scottsand-db self-assigned this Apr 7, 2025

@scovich scovich left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Clear and easy to read, thanks!

The PR description and associated issue don't seem to indicate why this new RFC replaces the original one, tho?

Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated

@xzhseh xzhseh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great RFC, thanks for the excellent work!

+1 on @scovich's comment to have detailed reasons why this RFC replaces the previous one.

Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment on lines +19 to +21
are already durable and visible to readers. For example, a catalog would want to block attempts to
drop the NOT NULL constraint on a column which is referenced by a FOREIGN KEY constraint in a
different table.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For example, a catalog would want to block attempts to drop the NOT NULL constraint on a column which is referenced by a FOREIGN KEY constraint in a different table.

Is this functionality already implemented in the current Delta codebase? For Catalog-Owned enabled tables, should Catalog Client takes the responsibility to check/block the attempt - or it depends on the actual Catalog implementation?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

You mean in our Delta Catalog? Hm. I'm not sure. I'd think this would instead be the responsibility of, say, a Glue catalog or Unity catalog implementation.

cc @scovich, @LukasRupprecht

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this functionality already implemented in the current Delta codebase? For Catalog-Owned enabled tables, should Catalog Client takes the responsibility to check/block the attempt - or it depends on the actual Catalog implementation?

This sort of functionality belongs to the catalog's own client (Glue, UC, etc) that interacts with Delta. The RFC only cares to ensure that catalogs are able to perform such checks, not whether/how they do it.

Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md
Comment thread protocol_rfcs/catalog-owned.md
Comment thread protocol_rfcs/catalog-owned.md
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated
Comment thread protocol_rfcs/catalog-owned.md Outdated
vkorukanti pushed a commit that referenced this pull request Apr 11, 2025
…ckfilled commit files (#4399)

<!--
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?
<!--
Please add the component selected below to the beginning of the pull
request title
For example: [Spark] Title of my pull request
-->

- [x] Spark
- [ ] Standalone
- [ ] Flink
- [ ] Kernel
- [ ] Other (fill in here)

## Description
Per [Catalog-Owned RFC](#4382), we
decided to use `_delta_log/_staged_commits/` folder to store all
staged/unbackfilled commit files, which is different from [Manged
Commits
RFC](https://github.com/delta-io/delta/blob/master/protocol_rfcs/managed-commits.md)'s
`_delta_log/_commits/` folder.

This PR changes the `COMMIT_SUBDIR` in both
`CoordinatedCommitsUtils.java` and `FilesNames.scala`, plus update all
the relevant comments/UTs.

<!--
- Describe what this PR changes.
- Describe why we need the change.
 
If this PR resolves an issue be sure to include "Resolves #XXX" to
correctly link and close the issue upon merge.
-->

## How was this patch tested?
Through existing UTs.

<!--
If tests were added, say they were added here. Please make sure to test
the changes thoroughly including negative and positive cases if
possible.
If the changes were tested in any way other than unit tests, please
clarify how you tested step by step (ideally copy and paste-able, so
that other reviewers can test and check, and descendants can verify in
the future).
If the changes were not tested, please explain why.
-->

## Does this PR introduce _any_ user-facing changes?
No, the change for commit subdirectory should **_not_** be a user-facing
change.

<!--
If yes, please clarify the previous behavior and the change this PR
proposes - provide the console output, description and/or an example to
show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change
compared to the released Delta Lake versions or within the unreleased
branches such as master.
If no, write 'No'.
-->
scottsand-db pushed a commit that referenced this pull request Apr 11, 2025
<!--
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?
<!--
Please add the component selected below to the beginning of the pull
request title
For example: [Spark] Title of my pull request
-->

- [X] Spark
- [ ] Standalone
- [ ] Flink
- [ ] Kernel
- [ ] Other (fill in here)

## Description

<!--
- Describe what this PR changes.
- Describe why we need the change.
 
If this PR resolves an issue be sure to include "Resolves #XXX" to
correctly link and close the issue upon merge.
-->
This PR implements the RFC "CatalogOwned" table feature to Delta-IO.
#4382

## How was this patch tested?

Existing & New unit tests. More tests will be added.

<!--
If tests were added, say they were added here. Please make sure to test
the changes thoroughly including negative and positive cases if
possible.
If the changes were tested in any way other than unit tests, please
clarify how you tested step by step (ideally copy and paste-able, so
that other reviewers can test and check, and descendants can verify in
the future).
If the changes were not tested, please explain why.
-->

## Does this PR introduce _any_ user-facing changes?
No.
<!--
If yes, please clarify the previous behavior and the change this PR
proposes - provide the console output, description and/or an example to
show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change
compared to the released Delta Lake versions or within the unreleased
branches such as master.
If no, write 'No'.
-->
Comment thread protocol_rfcs/catalog-owned.md Outdated
huan233usc pushed a commit to huan233usc/delta that referenced this pull request Apr 11, 2025
…ckfilled commit files (delta-io#4399)

<!--
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?
<!--
Please add the component selected below to the beginning of the pull
request title
For example: [Spark] Title of my pull request
-->

- [x] Spark
- [ ] Standalone
- [ ] Flink
- [ ] Kernel
- [ ] Other (fill in here)

## Description
Per [Catalog-Owned RFC](delta-io#4382), we
decided to use `_delta_log/_staged_commits/` folder to store all
staged/unbackfilled commit files, which is different from [Manged
Commits
RFC](https://github.com/delta-io/delta/blob/master/protocol_rfcs/managed-commits.md)'s
`_delta_log/_commits/` folder.

This PR changes the `COMMIT_SUBDIR` in both
`CoordinatedCommitsUtils.java` and `FilesNames.scala`, plus update all
the relevant comments/UTs.

<!--
- Describe what this PR changes.
- Describe why we need the change.
 
If this PR resolves an issue be sure to include "Resolves #XXX" to
correctly link and close the issue upon merge.
-->

## How was this patch tested?
Through existing UTs.

<!--
If tests were added, say they were added here. Please make sure to test
the changes thoroughly including negative and positive cases if
possible.
If the changes were tested in any way other than unit tests, please
clarify how you tested step by step (ideally copy and paste-able, so
that other reviewers can test and check, and descendants can verify in
the future).
If the changes were not tested, please explain why.
-->

## Does this PR introduce _any_ user-facing changes?
No, the change for commit subdirectory should **_not_** be a user-facing
change.

<!--
If yes, please clarify the previous behavior and the change this PR
proposes - provide the console output, description and/or an example to
show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change
compared to the released Delta Lake versions or within the unreleased
branches such as master.
If no, write 'No'.
-->
huan233usc pushed a commit to huan233usc/delta that referenced this pull request Apr 11, 2025
<!--
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?
<!--
Please add the component selected below to the beginning of the pull
request title
For example: [Spark] Title of my pull request
-->

- [X] Spark
- [ ] Standalone
- [ ] Flink
- [ ] Kernel
- [ ] Other (fill in here)

## Description

<!--
- Describe what this PR changes.
- Describe why we need the change.
 
If this PR resolves an issue be sure to include "Resolves #XXX" to
correctly link and close the issue upon merge.
-->
This PR implements the RFC "CatalogOwned" table feature to Delta-IO.
delta-io#4382

## How was this patch tested?

Existing & New unit tests. More tests will be added.

<!--
If tests were added, say they were added here. Please make sure to test
the changes thoroughly including negative and positive cases if
possible.
If the changes were tested in any way other than unit tests, please
clarify how you tested step by step (ideally copy and paste-able, so
that other reviewers can test and check, and descendants can verify in
the future).
If the changes were not tested, please explain why.
-->

## Does this PR introduce _any_ user-facing changes?
No.
<!--
If yes, please clarify the previous behavior and the change this PR
proposes - provide the console output, description and/or an example to
show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change
compared to the released Delta Lake versions or within the unreleased
branches such as master.
If no, write 'No'.
-->
@michelleon

Copy link
Copy Markdown

Thanks for the great work here! One minor naming suggestion: would the term catalogManaged be a clearer fit than catalogOwned?

“Managed” may better reflect the catalog’s role in governing both metadata and data operations like commits and reads. It also aligns with common terminology in systems like Snowflake-managed Iceberg tables [1] and Unity Catalog managed tables [2], where “managed” indicates that the catalog is responsible for the lifecycle of the table.

@scottsand-db

scottsand-db commented Apr 22, 2025

Copy link
Copy Markdown
Collaborator Author

@michelleon -- That's a great suggestion. Will implement that. Thanks!

@scottsand-db scottsand-db changed the title [PROTOCOL RFC] Catalog-owned Tables [PROTOCOL RFC] Catalog-managed Tables Apr 22, 2025
@scottsand-db
scottsand-db requested a review from xzhseh April 22, 2025 20:08
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated

@scovich scovich left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, but please address grammar nits before merging.

Comment thread protocol_rfcs/README.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated

@xzhseh xzhseh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM w/ two clarification questions!

Comment thread protocol_rfcs/catalog-managed.md Outdated
Comment thread protocol_rfcs/catalog-managed.md Outdated
@scottsand-db
scottsand-db force-pushed the catalog_owned_protocol_rfc branch from bfa3866 to 69b138b Compare June 6, 2025 15:31
@scottsand-db
scottsand-db merged commit cbdc133 into delta-io:master Jun 6, 2025
21 of 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.

7 participants