Repository navigation
Stream the CLI's JSON rows - #1327
Merged
Merged
Conversation
The repeated-column test fails: a projection naming a column twice writes its key twice.
2 tasks done
Base automatically changed from
claude/1322-walk-readdir
to
claude/1305-glob-speed
October 6, 2026 00:09
This was referenced Oct 6, 2026
Closed
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.
Fixes #1326
Stacked on #1324.
With JSON output (the default when stdout is not a terminal),
dirsql querynow writes each row as SQLite yields it. Before, it built aHashMapfor each row, then aserde_json::Valuetree, and then formatted that. The bytes printed are unchanged. A column named twice still gives one key, at its first position, holding the last value.These keep the old collected path:
The text is written once the statement finishes, so a query that fails part-way still prints no rows.
Red commit 0d5aa4b:
streamed_rows_keep_one_key_per_repeated_column_namefailed in CI because a repeated column's key was written twice.Measurements
Wall time, best of 3,
/usr/bin/time, release builds, #1324 compared with this PR:findSELECT path FROM './*'SELECT count(*) FROM './*'SELECT path FROM './**/*.md'SELECT count(*) FROM './**/*.md'glob_speed_one_level_test.py(#1305) now passes all 3 cases locally.I compared output from the #1324 binary and this one on 15 queries:
All 15 are byte-identical.
E2E Verification
just e2e-attest-python(pytest tests/e2e/): 43 passed. That includesglob_speed_one_level_test.py, so this time nothing was deselected.just e2e-attest-ts(pnpm test:e2e) passed.cargo test -p dirsql --features cli --no-fail-fasthad one failure, the watcher testserver_drops_the_rows_of_a_directory_moved_out_of_the_root. It does not touch this code path and passes when its binary is rerun on its own (47/47).| head -c 20, which closes the pipe without a panicChangelog / Migrations
packages/rust/changelog.d/2026-10-05-cli-stream-rows.mdpackages/rust/migrations.d/2026-10-05-cli-stream-rows.md(nothing breaks)