REST Spec: Add single and batch endpoints for loading relational objects (table, view, and future MV)#15830
Open
stevenzwu wants to merge 2 commits intoapache:mainfrom
Open
REST Spec: Add single and batch endpoints for loading relational objects (table, view, and future MV)#15830stevenzwu wants to merge 2 commits intoapache:mainfrom
stevenzwu wants to merge 2 commits intoapache:mainfrom
Conversation
Introduce GET /v1/{prefix}/namespaces/{namespace}/relations/{relation}
to resolve a namespace-qualified name as a table or view in one round
trip, returning a discriminated LoadRelationResult.
The response uses a nested structure where each object-type branch
wraps the type-specific payload under a named key (table or view).
This design avoids field-name collisions and allows future composite
types like materialized views to carry both view and storage-table
payloads in a single response.
Made-with: Cursor
Model: claude-4.6-opus-high-thinking
stevenzwu
commented
Mar 30, 2026
| view: | ||
| $ref: '#/components/schemas/LoadViewResult' | ||
|
|
||
| LoadRelationResult: |
Contributor
Author
There was a problem hiding this comment.
Future materialized-view would look like
{
"object-type": "materialized-view",
"view": { },
"storage-table": { }
}
Add POST /v1/{prefix}/relations/batch-load to batch load relations
(tables and views) across namespaces in one request.
Each request item uses a TableIdentifier (namespace + name) with
optional per-item etag and snapshots parameters. Each response item
includes a status field (200, 304, 404) and a nested result that
reuses LoadRelationResult with its object-type discriminator.
Servers may return unprocessed-identifiers to cap computation or
response payload size; clients should retry them.
Made-with: Cursor
Model: claude-4.6-opus-high-thinking
Made-with: Cursor
fd3e2d9 to
9a1edfd
Compare
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.
Design doc: https://docs.google.com/document/d/1VW5hgaaajRWtp5KbOU3s83YyoyPi5WOSvHtoJ_yXzJs/edit?tab=t.0#heading=h.e6w7vgpr8t2f