Skip to content

Add HTTP offline query submission and status APIs - #220

Merged
stsingh merged 1 commit into
mainfrom
sahej/java-offline-query
Nov 12, 2026
Merged

stsingh merged 1 commit into
mainfrom
sahej/java-offline-query

Conversation

@stsingh

@stsingh stsingh commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Java callers can now submit offline queries with offlineQuery(params) and poll a revision with getOfflineQueryStatus(params) to obtain completion, errors, and signed Parquet download URLs. Both methods wrap the existing /v4/offline_query REST endpoints; submission routes through the API server and status honors the configured query server.

Supports SQL or existing Parquet URI inputs, sampling without inputs, outputs/required outputs, time bounds, parallelism, and environment/branch overrides. Request timeouts apply to individual HTTP calls. Error lists preserve job failures, cancellation, and expiration, including errors returned with HTTP 200.

Scope: HTTP client only; gRPC clients return an explicit unsupported-operation error. Local input upload, automatic waiting, cancellation, and Java result-table loading are not included. No backend or protobuf changes.

Validation on Coder (JDK 17): ./gradlew test --tests ai.chalk.client.TestOfflineQuery --tests ai.chalk.client.TestPing --tests ai.chalk.client.TestAggregateBackfillClient — all 9 tests passed. Covers API/engine routing with separate mock servers, auth and environment/branch headers, request serialization, pending/success/failed/cancelled/expired responses, HTTP errors, and invalid parameters. git diff --check passed. Live staging smoke test (JDK 21) also passed in environment tmnmwqtcbscbd: revision 26fa641d-bf92-4fff-8baf-c6ceec0c438e. Submitted two synthetic merchant IDs via SQL input with an explicit timestamp, computed merchant.as_of, polled to completion, downloaded one Parquet file, and verified exactly two expected IDs and exact point-in-time timestamps. Online/offline feature persistence was disabled. All four workflow jobs completed; elapsed time was approximately 3m 40s.

@stsingh
stsingh marked this pull request as ready for review November 12, 2026 20:01
@stsingh
stsingh merged commit ab7ecb2 into main Nov 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants