amitvijapur opened a new pull request, #11176:
URL: https://github.com/apache/arrow-rs/pull/11176

   # Which issue does this PR close?
   
   Part of #10952.
   
   # Rationale for this change
   
   Running the benches once under `cargo test --benches` (the check #10952 asks 
for) reaches `arrow_reader_clickbench`, whose `hits_1()` shells out to `wget` 
for the 1.5 GB `hits_1.parquet` whenever the file is not on disk. In a test run 
that is either a large download or, where `wget` is absent, a panic before the 
first benchmark. Neither is what a once-through execution check wants.
   
   # What changes are included in this PR?
   
   A `skip_without_hits_1()` helper and an early return at the top of the three 
`criterion_group!` functions, ahead of the first `ReadTest::new`, which is 
where `hits_1()` gets called. The helper uses the same rule Criterion uses to 
pick test mode (`--bench` absent, or `--test` present) and the same 
parent-directory lookup `hits_1()` uses, so `cargo bench` is unchanged: with 
`--bench` and no `--test` the guard is false and the download path runs as 
before.
   
   # Are these changes tested?
   
   On `main`, `cargo test -p parquet --all-features --bench 
arrow_reader_clickbench` without the file panics with `Failed to execute wget`. 
On this branch it prints `hits_1.parquet not found; skipping ClickBench 
benchmarks under cargo test` once per group and exits 0. rustfmt and `clippy -D 
warnings` are clean on the bench target.
   
   # Are there any user-facing changes?
   
   No.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to