Skip to content

Deprecate external table location flag#5012

Merged
flyrain merged 6 commits into
apache:mainfrom
flyrain:agent/deprecate-external-table-location
Jul 16, 2026
Merged

Deprecate external table location flag#5012
flyrain merged 6 commits into
apache:mainfrom
flyrain:agent/deprecate-external-table-location

Conversation

@flyrain

@flyrain flyrain commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Deprecates ALLOW_EXTERNAL_TABLE_LOCATION as a legacy compatibility alias for external metadata file locations.

The current runtime behavior uses this flag to relax metadata file location checks, which overlaps with ALLOW_EXTERNAL_METADATA_FILE_LOCATION and makes it easy to confuse with ALLOW_UNSTRUCTURED_TABLE_LOCATION. This PR keeps behavior unchanged, but points users to:

  • ALLOW_EXTERNAL_METADATA_FILE_LOCATION for metadata files outside the table location
  • ALLOW_UNSTRUCTURED_TABLE_LOCATION for table/view locations outside the structured namespace layout

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed above; no linked issue.
  • 🧪 Manually tested with the commands above.
  • 💡 No complex logic added.
  • 🧾 Updated CHANGELOG.md.
  • 📚 Updated documentation in site/content/in-dev/unreleased.

Prepared with AI assistance; I reviewed and own the changes.

@github-project-automation github-project-automation Bot moved this to PRs In Progress in Basic Kanban Board Jul 8, 2026
@flyrain
flyrain marked this pull request as ready for review July 8, 2026 23:30
Copilot AI review requested due to automatic review settings July 8, 2026 23:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR deprecates the ALLOW_EXTERNAL_TABLE_LOCATION feature flag as a legacy compatibility alias, clarifying that it relaxes metadata file location checks (not table location structure) and directing operators to the more specific flags.

Changes:

  • Marked FeatureConfiguration.ALLOW_EXTERNAL_TABLE_LOCATION as deprecated and updated its description to point to ALLOW_EXTERNAL_METADATA_FILE_LOCATION.
  • Updated production configuration guidance and the feature-flag reference docs to reflect the deprecation and correct semantics.
  • Added a changelog entry documenting the deprecation and replacement guidance.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/_index.md Updates production guidance to call out ALLOW_EXTERNAL_TABLE_LOCATION as deprecated and point to the correct replacement flag.
site/content/in-dev/unreleased/configuration/config-sections/flags-polaris_features.md Updates the feature-flag reference text to clarify the deprecated flag’s behavior and recommended replacements.
polaris-core/src/main/java/org/apache/polaris/core/config/FeatureConfiguration.java Deprecates the legacy flag constant and updates its description to reduce operator confusion.
CHANGELOG.md Documents the deprecation and the recommended replacement flag for external metadata file locations.

* retained as a compatibility alias for external metadata file locations.
*/
@SuppressWarnings("DeprecatedIsStillUsed")
@Deprecated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this helpful? If we do not want Polaris code to use it, let's just refactor to remove all usages.

If we want users to avoid using it, a code annotation is not going to be effective (doc change LGTM).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm OK to remove the usage, but If we remove it, existing deployments using the old flag stop working immediately. That’s not deprecation anymore, it’s behavior removal. Are we OK to do so?

boolean allowEscape = realmConfig.getConfig(FeatureConfiguration.ALLOW_EXTERNAL_TABLE_LOCATION);
if (!allowEscape
    && !realmConfig.getConfig(FeatureConfiguration.ALLOW_EXTERNAL_METADATA_FILE_LOCATION)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I mean, let's deprecate it for end users in docs for now, but keep the code un-deprecated (because we have legit usage in current code). When we're ready to remove support, we'll simply drop the whole config constant.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good to me. I think that's what the current PR does. Feel free to suggest any changes if I miss something.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd propose removing this @Deprecated annotation (but keeping doc changes).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

step 1 SGTM. Do we have other steps? Is warning message still a blocker?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Step 2: Add comments to "prod" code that refers to ALLOW_EXTERNAL_TABLE_LOCATION for backward-compatibility reasons. Explain why it still uses ALLOW_EXTERNAL_TABLE_LOCATION and suppress deprecation warnings in those specific cases.

That's all.

@dimas-b dimas-b Jul 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

After step 2 there should be no deprecation warnings related to ALLOW_EXTERNAL_TABLE_LOCATION in Polaris code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed both steps in the new commit.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks a lot!

@flyrain
flyrain force-pushed the agent/deprecate-external-table-location branch from 2735c1f to 0385fad Compare July 15, 2026 23:21
@MonkeyCanCode

Copy link
Copy Markdown
Contributor

Had been busy with work lately. I will review later tonight. Sorry for the delay.

dimas-b
dimas-b previously approved these changes Jul 16, 2026

@dimas-b dimas-b left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the update, @flyrain ! Changes LGTM 👍 javac output is clean 🎉

.buildFeatureConfiguration();

/**
* @deprecated since 1.7.0, will be removed in 1.8.0. Use {@link

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Add since and forRemoval = true to @Deprecated?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1, maybe @Deprecated(since = "1.7.0", forRemoval = true)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed, PTAL.

@github-project-automation github-project-automation Bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Jul 16, 2026
MonkeyCanCode
MonkeyCanCode previously approved these changes Jul 16, 2026
.buildFeatureConfiguration();

/**
* @deprecated since 1.7.0, will be removed in 1.8.0. Use {@link

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1, maybe @Deprecated(since = "1.7.0", forRemoval = true)

@flyrain
flyrain dismissed stale reviews from MonkeyCanCode and dimas-b via 5731c5c July 16, 2026 06:38
@flyrain
flyrain merged commit 5c755ee into apache:main Jul 16, 2026
25 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in Basic Kanban Board Jul 16, 2026
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