Add RestSessionCatalog - #2920
Open
DerGut wants to merge 3 commits into
Open
Conversation
DerGut
force-pushed
the
rest-session-catalog
branch
from
July 28, 2026 22:21
9f36a56 to
75caec7
Compare
DerGut
force-pushed
the
rest-session-catalog
branch
2 times, most recently
from
August 5, 2026 15:57
beedd7a to
2dd57e5
Compare
DerGut
force-pushed
the
rest-session-catalog
branch
from
August 5, 2026 16:30
2dd57e5 to
f154271
Compare
DerGut
commented
Aug 5, 2026
|
|
||
| /// Configures the session that will be used with this catalog. | ||
| /// Overwrites the default empty session from SessionContext::empty(). | ||
| pub fn with_session(mut self, session: SessionContext) -> Self { |
Contributor
Author
There was a problem hiding this comment.
As mentioned in the "Welcome Feedback ❓" section, I could use some opinions on the session vs. context/ ctx variable naming. I feel like what we introduce here will be reused throughout.
Suggested change
| pub fn with_session(mut self, session: SessionContext) -> Self { | |
| pub fn with_session_context(mut self, ctx: SessionContext) -> Self { |
DerGut
marked this pull request as ready for review
August 5, 2026 17:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
What changes are included in this PR?
This PR adds
RestSessionCatalog, implementing theSessionCatalogAPI introduced in #2836.RestSessionCatalogbecomes the core REST implementation. The existingRestCatalogdelegates to it with an internalSessionContext, preserving session-unaware behavior. The REST test suite is refactored to exerciseRestSessionCatalogdirectly.Welcome Feedback ❓
The main question I had while implementing this is which canonical variable name we should introduce for the
SessionContext. The current implementation usessessionbecause there's already acontextin theRestSessionCatalog's scope (which deals with the lazy creation of the client via the/v1/configendpoint).Arguably, the
SessionContextisn't equivalent to a session. It may carry state from a query engine's session, and it may be converted to anAuthSessionwhich is a session in the Iceberg sense. But maybe it's close enough.An alternative way to name the
SessionContextin variables would be to rename theRestContexttype to something likeRestClient, we'd free the concept of a context in that scope.Follow-ups
This PR is going to be followed by a
integrations/datafusionPR that starts using aSessionCatalogto propagate Datafusion sessions.Are these changes tested?
The existing test suite passes after backing the
RestCatalogwith theRestSessionCatalog(first commit c7fd2fe). Afterwards, I've refactored the test suite to test theRestSessionCatalogdirectly (as it now contains the core logic), and added some additional tests for session catalog creation and integration-style tests that assert the delegation is working.