Skip to content

Extend SupportsCatalogOptions to allow migration from DSv1 file based data source#56617

Draft
johanl-db wants to merge 1 commit into
apache:masterfrom
johanl-db:supports-catalog-options-extension
Draft

Extend SupportsCatalogOptions to allow migration from DSv1 file based data source#56617
johanl-db wants to merge 1 commit into
apache:masterfrom
johanl-db:supports-catalog-options-extension

Conversation

@johanl-db

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Extend SupportsCatalogOption DSv2 interface with:

  • useCatalogResolution: dynamically toggles using the behavior offered by SupportsCatalogOption. Needed to have a migration path from file-based source (DSv1) to DSv2 + SupportsCatalogOption that's not just a static on/off
  • failIfTableDoesNotExist: whether df.write.format(<format>).mode("append"/"overwrite").save() should succeed when the table doesn't exist.

Why are the changes needed?

Delta will be migrating from a file-based data source (DSv1) for path based accesses to DSv2 using SupportsCatalogOption.
Two blockers are present:

  • The migration can't be a static on/off based on the delta TableProvider extending SupportsCatalogOptions or not. it will be a dynamic decision based on a flag to provide a migration and possibility to disable the new behavior if needed.
  • Delta, as a file-based source, allows df.write.format(<format>).mode("append"/"overwrite").save() when the table doesn't exist yet and will create it. This behavior must be preserved.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Added tests in SupportsCatalogOptionSuite

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.

1 participant