Skip to content

[rest] Preserve custom catalog for dependency reads - #8912

Merged
leaves12138 merged 1 commit into
apache:masterfrom
leaves12138:codex/preserve-custom-rest-metastore
Jul 29, 2026
Merged

[rest] Preserve custom catalog for dependency reads#8912
leaves12138 merged 1 commit into
apache:masterfrom
leaves12138:codex/preserve-custom-rest-metastore

Conversation

@leaves12138

Copy link
Copy Markdown
Contributor

Purpose

Follow up on the post-merge review of #8823 and preserve custom REST Catalog
implementations during dependency reads.

Root cause

Dependency reads may reconstruct a catalog through CatalogFactory using a
derived CatalogContext. #8823 populated metastore=rest so directly
constructed REST catalogs without a metastore option would not fall back to the
filesystem catalog.

That fallback was applied unconditionally, so a custom REST Catalog such as
metastore=custom-rest was replaced with the built-in REST Catalog identifier.

Changes

  • Preserve an explicitly configured metastore identifier.
  • Set metastore=rest only when the derived context has no metastore option.
  • Add a regression test for a custom REST metastore identifier.

Directly constructed built-in REST catalogs continue to receive the rest
fallback, while custom REST Catalog factories are reconstructed through their
original identifier.

Validation

  • mvn -pl paimon-core -am -Pfast-build -DfailIfNoTests=false -DwildcardSuites=none '-Dtest=CatalogEnvironmentTest,BlobDescriptorReaderFactoryTest,MockRESTCatalogTest#testReadViaHeaderOnDependencyTableAndDataTokenRequests' test
    (11 tests passed)
  • mvn -pl paimon-core -DskipTests test-compile
  • git diff --check

@leaves12138
leaves12138 marked this pull request as ready for review July 29, 2026 12:21

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

+1,Look good to me

@leaves12138
leaves12138 merged commit 1b57cea into apache:master Jul 29, 2026
12 checks passed
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