8000 [SPARK] UCCatalog preserve old table properties in REPLACE TABLE AS SELECT by amaliujia · Pull Request #984 · unitycatalog/unitycatalog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[SPARK] UCCatalog preserve old table properties in REPLACE TABLE AS SELECT #984

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

amaliujia
Copy link
Collaborator
@amaliujia amaliujia commented Apr 25, 2025

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added or modified a feature, documentation in docs is updated

Description of changes

UC Catalog can implement StagingTableCatalog to customize REPLACE TABLE AS SELECT behavior. With this change, UC Catalog when handling Delta tables, will preserve the old Delta table properties in the new created table.

}

def loadTableProperties(ident: Identifier, properties: util.Map[String, String]): util.Map[String, String] = {
if (ucProxy != null && ucProxy == this.delegate &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't need this new ucProxy variable, we already have UCSingleCatalog.DELTA_CATALOG_LOADED

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@amaliujia amaliujia changed the title [SPARK] Support Delta replace table [SPARK] UCCatalog preserve old table properties in REPLACE TABLE AS SELECT Apr 25, 2025
@cloud-fan
Copy link
Collaborator

This depends on a spark side fix: apache/spark@aea5836

@amaliujia amaliujia force-pushed the add_delta_replace_table branch from 3e785b4 to dac3127 Compare May 14, 2025 22:14
@amaliujia amaliujia force-pushed the add_delta_replace_table branch from d63f578 to d667b11 Compare June 24, 2025 23:10
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.

2 participants
0