Core: Add Java reference implementation for relation load endpoints#15831
Draft
stevenzwu wants to merge 3 commits intoapache:mainfrom
Draft
Core: Add Java reference implementation for relation load endpoints#15831stevenzwu wants to merge 3 commits intoapache:mainfrom
stevenzwu wants to merge 3 commits intoapache:mainfrom
Conversation
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
0dc0209 to
1dc289a
Compare
… 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
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
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.
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:
Modified:
Made-with: Cursor
Model: claude-4.6-opus-high-thinking