feat(cubestore): Introduce HttpQueryResultCompleted for zero-column r…#11019
Conversation
…esults Write commands (CREATE TABLE/INSERT, queue/cache writes) return zero columns. When such a result was requested in Arrow format, building the Arrow IPC stream failed with "must either specify a row count or at least one column" because RecordBatch::try_new can't infer the row count from an empty column set. Instead of forcing an empty Arrow stream onto the wire, extend the protocol with a dedicated result type. HttpQueryResult already carries the HttpQueryResultData union; add an HttpQueryResultCompleted marker to it. When an Arrow-format query produces no columns, the server now answers with QueryResultCompleted rather than an Arrow payload. QueryResultFormat (the request enum) is left untouched, so Completed is a server-chosen result shape that clients can never request. The JS driver uses the legacy format, so the only Arrow consumer is the cubestore-ws-transport crate, which decodes the marker into the new ResultData::Completed / ResponseFormat::Completed.
|
Claude finished @ovr's task in 53s —— View job Code ReviewVerdict: LGTM — clean protocol extension with solid test coverage. 0 high, 1 medium, 2 low. Details
FindingsMedium — wire-level back-compat between old/new peers The PR body says "the only Arrow consumer is the cubestore-ws-transport crate, which decodes the marker into the new Before this PR, the same case errored on the server side ("must either specify a row count…"), so this is a change in where the error surfaces, not a regression. Still worth confirming that operators are expected to upgrade client + server together, or document the version requirement. If mixed-version operation matters, the new server could be kept opt-in (e.g. only emit Low — zero-column detection is structural
Low — exhaustive log-format match arms duplicated
Praise
|
|
Claude finished @ovr's task in 37s —— View job Code Review (updated for 835d5b5)Verdict: LGTM — the new commit is a clean test-only refactor with no behavioral change. Prior findings unchanged. Details
Latest commit (835d5b5)Lifts the inline Findings (carried over from prior review)Medium — wire-level back-compat between old/new peers The PR body says "the only Arrow consumer is the cubestore-ws-transport crate, which decodes the marker into the new Before this PR, the same case errored on the server side ("must either specify a row count…"), so this is a change in where the error surfaces, not a regression. Still worth confirming that operators are expected to upgrade client + server together, or document the version requirement. If mixed-version operation matters, the new server could be kept opt-in (e.g. only emit Low — zero-column detection is structural
Low — exhaustive log-format match arms duplicated
Praise
|
|
Claude finished @ovr's task in 42s —— View job Code Review (updated for 8a27cf8)Verdict: LGTM — small, correct CLI follow-up. Prior findings unchanged. 0 high, 1 medium, 2 low. Details
Latest commit (8a27cf8)Adds the missing Minor nit (optional, not blocking): the Findings (carried over from prior reviews)Medium — wire-level back-compat between old/new peers The PR body says "the only Arrow consumer is the cubestore-ws-transport crate, which decodes the marker into the new Before this PR, the same case errored on the server side ("must either specify a row count…"), so this is a change in where the error surfaces, not a regression. Still worth confirming operators upgrade client + server together, or document the version requirement. Low — zero-column detection is structural
Low — exhaustive log-format match arms duplicated
Praise
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11019 +/- ##
===========================================
+ Coverage 58.57% 78.82% +20.24%
===========================================
Files 216 471 +255
Lines 17181 94442 +77261
Branches 3502 3502
===========================================
+ Hits 10064 74441 +64377
- Misses 6609 19493 +12884
Partials 508 508
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…esults
Write commands (CREATE TABLE/INSERT, queue/cache writes) return zero columns. When such a result was requested in Arrow format, building the Arrow IPC stream failed with "must either specify a row count or at least one column" because RecordBatch::try_new can't infer the row count from an empty column set.
Instead of forcing an empty Arrow stream onto the wire, extend the protocol with a dedicated result type. HttpQueryResult already carries the HttpQueryResultData union; add an HttpQueryResultCompleted marker to it. When an Arrow-format query produces no columns, the server now answers with QueryResultCompleted rather than an Arrow payload. QueryResultFormat (the request enum) is left untouched, so Completed is a server-chosen result shape that clients can never request.
The JS driver uses the legacy format, so the only Arrow consumer is the cubestore-ws-transport crate, which decodes the marker into the new ResultData::Completed / ResponseFormat::Completed.