Skip to content

Preserve primary output when lazy SQL draining fails - #103

Merged
apstndb merged 1 commit into
mainfrom
fix/review-late-query-output
Sep 22, 2026
Merged

apstndb merged 1 commit into
mainfrom
fix/review-late-query-output

Conversation

@apstndb

@apstndb apstndb commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Lazy jq filters such as first(.rows[]) can finish before the SQL stream does. With split plan output, a later SQL error previously replaced an existing primary output file with partial results.

Mark the primary output complete only after the required SQL drain succeeds. Preserve publication when SQL succeeds but subsequent plan rendering fails. Regression tests exercise both cases through the real Spanner client and a local gRPC fixture with a resume token.

Validation: Go 1.25.13 build, full tests with the Spanner emulator, and golangci-lint; independent regression verification.

@apstndb
apstndb merged commit 70ec31c into main Sep 22, 2026
2 checks 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.

1 participant