Skip to content

Core: Remove deprecated REST namespace encoding helpers - #17697

Open
dramaticlly wants to merge 3 commits into
apache:mainfrom
dramaticlly:1.12deprecation-core-restutil
Open

Core: Remove deprecated REST namespace encoding helpers#17697
dramaticlly wants to merge 3 commits into
apache:mainfrom
dramaticlly:1.12deprecation-core-restutil

Conversation

@dramaticlly

Copy link
Copy Markdown
Contributor

Removes REST API deprecated for removal in 1.12.0:

  • RESTUtil.NAMESPACE_JOINER / NAMESPACE_SPLITTER, superseded by namespaceToQueryParam(Namespace) / namespaceFromQueryParam(String)
  • RESTUtil.encodeNamespace(Namespace) / decodeNamespace(String), superseded by the two-arg overloads that take an explicit separator
  • RESTSessionCatalog.REST_PAGE_SIZE, superseded by RESTCatalogProperties.PAGE_SIZE
  • CatalogHandlers.loadTable(Catalog, TableIdentifier), superseded by the overload taking a SnapshotMode

Javadoc on namespaceToQueryParam and encodeNamespace no longer cross-links the removed single-arg encodeNamespace; the wording now describes the raw versus percent-encoded separator directly.

AI Disclosure

Model: Claude Opus 5 (1M context)
Platform/Tool: Claude Code
Human Oversight: reviewed
Prompt Summary: split #16449 into smaller self-contained PRs; verify each group compiles and tests green standalone

@github-actions github-actions Bot added the core label Aug 17, 2026
@dramaticlly

Copy link
Copy Markdown
Contributor Author

@gaborkaszab can you help take a look? for #13991 and #14060
@nastra can you check the deprecation align with your expectation in #10877

Comment thread core/src/test/java/org/apache/iceberg/rest/TestRESTUtil.java Outdated
Comment thread .palantir/revapi.yml Outdated

@nastra nastra 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.

LGTM with 2 minor things

@nastra
nastra requested a review from singhpk234 August 18, 2026 05:50

@uros-b uros-b left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1, LGTM!

@singhpk234 singhpk234 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.

LGTM mostly, added a small suggestion and question for verbosity pov

Comment thread .palantir/revapi.yml Outdated
Comment thread core/src/main/java/org/apache/iceberg/rest/RESTUtil.java Outdated
Removes REST API deprecated for removal in 1.12.0:

- RESTUtil.NAMESPACE_JOINER / NAMESPACE_SPLITTER, superseded by
  namespaceToQueryParam(Namespace) / namespaceFromQueryParam(String)
- RESTUtil.encodeNamespace(Namespace) / decodeNamespace(String), superseded
  by the two-arg overloads that take an explicit separator
- RESTSessionCatalog.REST_PAGE_SIZE, superseded by
  RESTCatalogProperties.PAGE_SIZE
- CatalogHandlers.loadTable(Catalog, TableIdentifier), superseded by the
  overload taking a SnapshotMode

Javadoc on namespaceToQueryParam and encodeNamespace no longer cross-links
the removed single-arg encodeNamespace; the wording now describes the raw
versus percent-encoded separator directly.
The deprecation notice said this constructor would be made private in
1.12.0. It had no callers anywhere in the repo, so making it private
would leave an unused private constructor; remove it instead. Removal
and privatization are indistinguishable to external callers.
Review feedback from nastra and singhpk234:

- Keep the decode separator in encodeAsOldClientAndDecodeAsNewServer
  hardcoded as "%2E". The test only needs a separator that differs from
  the legacy one; it does not have to be the one RESTCatalogAdapter
  advertises.
- Use "Removed deprecated functionality scheduled for removal in 1.12.0"
  as the revapi justification for all seven accepted breaks. The previous
  text claimed every break was part of the namespace encoding API, which
  was not true for REST_PAGE_SIZE, CatalogHandlers.loadTable and the
  ResourcePaths constructor.
- Drop the javadoc note on namespaceToQueryParam(Namespace, String). The
  separator is an explicit argument there, so warning that it differs from
  encodeNamespace adds nothing.
- Keep the note on the no-arg namespaceToQueryParam, which hides the
  separator, but point it at the surviving encodeNamespace(Namespace,
  String) overload. The distinction it warns about is real:
  namespaceToQueryParam joins raw levels, while encodeNamespace
  URL-encodes each level.
@dramaticlly
dramaticlly force-pushed the 1.12deprecation-core-restutil branch from 40d5c7f to 8a4b607 Compare August 18, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants