Repository navigation
Use latest Hotdata API: inline Arrow results, pagination, real error messages - #66
Merged
Merged
Conversation
…_message - Request Arrow from POST /v1/query so fast queries take one round trip; fall back to the Results API on 202 (async or too large). - Read error_message from failed query runs and results; show code/message from Hotdata error bodies. - Follow next_cursor pagination on /v1/databases and /v1/information_schema. - Handle Results API 202 (Retry-After) and 409 responses. - Health check pings GET /v1/databases?limit=1.
eddietejeda
requested review from
anoop-narang
and removed request for
a team
October 24, 2026 22:31
| } | ||
| q.Set("cursor", p.NextCursor) | ||
| } | ||
| return nil |
There was a problem hiding this comment.
nit: Return an error or log a warning when listPages exits at maxPages with has_more still true (not blocking).
At the cap, the function returns nil, so callers get a partial list with no signal. ListDatabases stops at 10,000 databases. InformationSchema sends no limit, so its cap depends on the server's default page size and can be much lower. The database picker and autocomplete then hide the missing entries without any error.
This was referenced Oct 24, 2026
Merged
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.
Summary
Aligns the backend client with the current Hotdata API reference (https://www.hotdata.dev/docs/api-reference).
POST /v1/querysendsAccept: application/vnd.apache.arrow.stream. Fast queries return Arrow in one request (metadata fromX-Query-Run-Id/X-Result-Id/X-Execution-Time-Msheaders). A202withX-Result-Id(result too large) reads from the Results API without polling the run; a plain202still polls the run.error_messagefrom failed query runs and failed results (was readingerror/message, so users saw only "query run failed"). Error bodies{"error":{"code","message"}}now render asmessage (CODE)instead of raw JSON.has_more/next_cursoron/v1/databasesand/v1/information_schema. Before, the database picker and autocomplete only saw the first page.202+Retry-Afterwhile persisting, and409on failure.GET /v1/databases?limit=1instead of listing every database.Testing
go test ./pkg/...— new tests for inline Arrow, too-large202, failed runerror_message, JSON fallback, pagination, error message parsing.plugin.jsonchanges.