feat(query): expose scanned bytes/rows and surface query_run_id - #236
Conversation
| ); | ||
| // Serialize the display struct directly; `warning` is `#[serde(skip)]` | ||
| // (stderr-only), the rest is the JSON body. | ||
| println!("{}", serde_json::to_string_pretty(result).unwrap()); |
There was a problem hiding this comment.
nit: (not blocking) Serializing the struct directly drops the preview_row_count field the old result_json emitted, so this is a backward-incompatible change to the --output json shape. The value is still recoverable from row_count (they were always equal), but any consumer reading preview_row_count will now get undefined. Worth confirming this is intended and noting it in the changelog / release notes if the JSON output is a public contract.
There was a problem hiding this comment.
Approving. One non-blocking note left inline about the removed preview_row_count field in the --output json shape. Otherwise the changes are consistent with existing patterns (double-option flatten + clamp, warning stays stderr-only) and well covered by tests.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Expose
bytes_scanned/rows_scannedfrom the query-run history API inhotdata queries, and surfacequery_run_idinhotdata queryoutput (footer + JSON) so the run lookup is actually reachable. The query JSON body now serializes the response struct directly.BREAKING CHANGE:
hotdata query --output jsonno longer emitspreview_row_count(userow_count), and thewarningfield is now stderr-only rather than in the JSON body.