Skip to content
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

Fix REST session bug for Iceberg REST catalogs #23722

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kiersten-stokes
Copy link
Contributor

@kiersten-stokes kiersten-stokes commented Sep 25, 2024

Description

By relying on the Iceberg loadCatalog utility function for RESTCatalogs, there was no way to specify options for a RESTSessionCatalog. The result of this is that Iceberg REST user sessions were not being honored. This PR changes the flow for RESTCatalogs only, manually creating a RESTCatalog instance with the correct RESTSessionCatalog context.

Motivation and Context

Fixes a known bug with REST sessions not working as expected (no related issue).

Test Plan

Manual testing was done. Adding a CI test would not be trivial and would require changes to the test REST server. I plan on further investigating options for this.

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== NO RELEASE NOTE ==

return catalogCache.get(getCacheKey(session), () -> {
RESTCatalog catalog = new RESTCatalog(
convertSession(session),
config -> HTTPClient.builder(config).uri(config.get(CatalogProperties.URI)).build());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to change the import for CatalogProperties.URI

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