Skip to content

Core: Add Java reference implementation for relation load endpoints#15831

Draft
stevenzwu wants to merge 3 commits intoapache:mainfrom
stevenzwu:rest-relation-endpoints
Draft

Core: Add Java reference implementation for relation load endpoints#15831
stevenzwu wants to merge 3 commits intoapache:mainfrom
stevenzwu:rest-relation-endpoints

Conversation

@stevenzwu
Copy link
Copy Markdown
Contributor

Add DTOs, parsers, handlers, and client methods for the universal relation load endpoints (GET /v1/{prefix}/namespaces/{namespace}/relations/{relation} and POST /v1/{prefix}/relations/batch-load) defined in the REST spec.

New types:

  • CatalogObjectType enum (TABLE, VIEW)
  • LoadRelationResponse with discriminated table/view branches
  • BatchLoadRelationsRequest/Response with per-item status codes
  • BatchLoadRelationsForbiddenResponse (allOf ErrorModel pattern)

Modified:

  • ResourcePaths, Endpoint: new route constants and path builders
  • RESTSerializers: registered serializers for new types
  • ErrorHandlers: added relationErrorHandler
  • CatalogHandlers: loadRelation and batchLoadRelations server handlers
  • RESTSessionCatalog: loadRelation and batchLoadRelations client methods
  • RESTCatalogAdapter, Route: test adapter handler cases

Made-with: Cursor
Model: claude-4.6-opus-high-thinking

@github-actions github-actions bot added the core label Mar 31, 2026
Add DTOs, parsers, handlers, and client methods for the universal
relation load endpoints (GET /v1/{prefix}/namespaces/{namespace}/relations/{relation}
and POST /v1/{prefix}/relations/batch-load) defined in the REST spec.

New types:
- CatalogObjectType enum (TABLE, VIEW)
- LoadRelationResponse with discriminated table/view branches
- BatchLoadRelationsRequest/Response with per-item status codes
- BatchLoadRelationsForbiddenResponse (allOf ErrorModel pattern)

Modified:
- ResourcePaths, Endpoint: new route constants and path builders
- RESTSerializers: registered serializers for new types
- ErrorHandlers: added relationErrorHandler
- CatalogHandlers: loadRelation and batchLoadRelations server handlers
- RESTSessionCatalog: loadRelation and batchLoadRelations client methods
- RESTCatalogAdapter, Route: test adapter handler cases

Made-with: Cursor
Model: claude-4.6-opus-high-thinking
Made-with: Cursor
@stevenzwu stevenzwu force-pushed the rest-relation-endpoints branch from 0dc0209 to 1dc289a Compare March 31, 2026 00:29
… implementation

Move CatalogObjectType enum from core/rest to api/catalog for broader
API visibility. Add Relation class with forTable/forView factory methods
and SupportsRelations interface defining loadRelation and loadRelations
APIs. RESTCatalog implements SupportsRelations, delegating to
RESTSessionCatalog which handles ETag caching for tables and constructs
full Table/View objects from REST responses.

Made-with: Cursor
Model: claude-4.6-opus-high-thinking
@github-actions github-actions bot added the API label Mar 31, 2026
Add TableIdentifier field to Relation so consumers can identify
which object each relation corresponds to. Add notFound(TableIdentifier)
factory method for representing non-existent objects where only the
identifier is known.

Made-with: Cursor
Model: claude-4.6-opus-high-thinking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant