Skip to content

[Spark] Fix REPLACE and CREATE LIKE for CatalogOwned #4504

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

Closed

Conversation

xzhseh
Copy link
Contributor

@xzhseh xzhseh commented May 7, 2025

Which Delta project/connector is this regarding?

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

Description

This PR fixes two subtle but critical parts for CatalogOwned enable table.

  • For CREATE LIKE, enable CatalogOwned w/ default spark configuration.
    • This is different from the normal behavior/semantic of CREATE LIKE, where the source table protocol will take precedence and override any default (table feature) enablement.
  • For REPLACE, only filter out CatalogOwnedTableFeature if the existing table does not have CatalogOwned enabled - otherwise there would be protocol downgrade issue if we are adding new table feature (e.g., ClusteringTableFeature) at the same time.
    • We also filter out any unintended InCommitTimestampTableFeature if the original table does not have ICT enabled, and users are not enabling ICT via explicit overrides or default ICT spark configuration.
      • The unintended InCommitTimestampTableFeature may be generated as part of the default CatalogOwned enablement, and we do not support enabling CatalogOwned through REPLACE.

How was this patch tested?

N/A

Does this PR introduce any user-facing changes?

N/A

Copy link
Contributor

@yumingxuanguo-db yumingxuanguo-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!

@xzhseh xzhseh closed this May 13, 2025
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