Preserve native query and query-file multiplicity in local client - #506
Preserve native query and query-file multiplicity in local client#506sdairs wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 133d21b. Configure here.
| if let Some(f) = &queries_file { | ||
| cmd.arg("--queries-file").arg(f); | ||
| if !queries_file.is_empty() { | ||
| cmd.arg("--queries-file").args(queries_file); |
There was a problem hiding this comment.
Wrong queries-file argv forwarding
High Severity
run_client forwards every collected path after a single --queries-file, while --query re-emits the flag per value. Native clickhouse-client expects repeated --queries-file occurrences (one path each). With multiple files, later paths become positionals instead of query sources, so multi-file runs can skip or mis-handle inputs.
Reviewed by Cursor Bugbot for commit 133d21b. Configure here.


Summary
--queryvalue and forward each as a native query option in source order--queries-filepaths, including repeated wrapper flags, and emit the native multi-path argv shapeCloses #470
Decision
Native source for 25.8.32.4 LTS, 25.12.9.61, 26.3.21.7 LTS, 26.7.5.10 stable, and current master uses a repeatable query vector, a multi-token queries-file vector, and rejects the two source types together. The wrapper therefore emits repeated
--querypairs, emits one--queries-filefollowed by every path, and rejects combined forms before resolution or child execution. The JSON output contract in #468 remains unchanged.Verification
cargo fmt --all --checkcargo build -p clickhousectlcargo test -p clickhousectl(762 passed)cargo clippy -p clickhousectl --all-targets -- -D warnings--pass-through forms across the existing 25.x and 26.x client-version fixturesStack
issue-469-direct-client-version)