Skip to content

Core: Add batch load endpoints for tables and views#15669

Closed
stevenzwu wants to merge 1 commit intoapache:mainfrom
stevenzwu:rest-batch-load
Closed

Core: Add batch load endpoints for tables and views#15669
stevenzwu wants to merge 1 commit intoapache:mainfrom
stevenzwu:rest-batch-load

Conversation

@stevenzwu
Copy link
Copy Markdown
Contributor

@stevenzwu stevenzwu commented Mar 17, 2026

Implement the Java side of the batch load REST endpoints (POST /v1/{prefix}/tables/batch-load and views/batch-load).

This includes request/response models, custom JSON parsers, serializer registration, routing, server-side handlers in CatalogHandlers, RESTCatalogAdapter routing, and client-side methods in RESTSessionCatalog returning CloseableIterable with automatic retry of unprocessed tables.

The OpenAPI spec changes are tracked in a separate PR (#15528).

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

I carefully reviewed the changes and refined the implementation with a few iterations

  • changed the RESTSessionCatalog#batchLoadTables return type from a list to an iterable so that results can be consumed in a streaming fashion in case of server pagination and client retries. This avoid holding a large amount of items in memory for large responses.
  • Changed requestedSnapshots from String to SnapshotMode enum — In BatchLoadRequestedTable.java, the return type was changed from String to SnapshotMode enum, providing type safety.
  • Added retry integration test — testBatchLoadTablesRetryUnprocessed in TestRESTCatalog.java verifies the client's automatic retry behavior when the server returns unprocessed tables.

@github-actions github-actions bot added the core label Mar 17, 2026
@stevenzwu stevenzwu force-pushed the rest-batch-load branch 2 times, most recently from 3f2d3c9 to 2f34901 Compare March 19, 2026 20:41
@github-actions github-actions bot added the API label Mar 19, 2026
Add batch load REST endpoints, serializers, and RESTSessionCatalog wiring.
SessionCatalog and ViewSessionCatalog gain default batchLoadTable(s) /
batchLoadView(s) methods returning CloseableIterable.

Made-with: Cursor
Model: GPT-5.2
@stevenzwu stevenzwu marked this pull request as draft March 21, 2026 21:10
@stevenzwu stevenzwu closed this Mar 30, 2026
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