Skip to content

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
stevenzwu:rest-spec-universal-load
Open

REST Spec: Add single and batch endpoints for loading relational objects (table, view, and future MV)#15830
stevenzwu wants to merge 2 commits intoapache:mainfrom
stevenzwu:rest-spec-universal-load

Conversation

@stevenzwu
Copy link
Copy Markdown
Contributor

@stevenzwu stevenzwu commented Mar 30, 2026

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
view:
$ref: '#/components/schemas/LoadViewResult'

LoadRelationResult:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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
@stevenzwu stevenzwu force-pushed the rest-spec-universal-load branch from fd3e2d9 to 9a1edfd Compare March 30, 2026 20:40
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.

1 participant