Skip to content

Commit ef9a80c

Browse files
Add strategy-focused InList benchmarks (#21648)
## Which issue does this PR close? - Part of #19241. - This PR was originally proposed as the first commit in the broader `IN LIST` optimization series in #19390. ## Rationale for this change `IN LIST` has become the target of several specialized execution strategies, but the existing benchmark coverage in `datafusion/physical-expr/benches/in_list.rs` is mostly end-to-end and historical in nature. That broad coverage is useful for regression tracking, but it is not ideal for answering more focused questions such as: - how a specific strategy behaves as the list size crosses a threshold - whether the fast path helps both hit-heavy and miss-heavy workloads - how null handling affects the strategy-specific implementations - how two-stage string filters behave in their worst-case collision patterns This PR adds a dedicated strategy benchmark harness for `IN LIST` so future performance work can be evaluated against a stable, repeatable, strategy-focused corpus. This PR does not change `InList` execution behavior. It only adds benchmark coverage. ## What changes are included in this PR? - Adds `datafusion/physical-expr/benches/in_list_strategy.rs` - Registers the new benchmark target in `datafusion/physical-expr/Cargo.toml` - Keeps the existing `benches/in_list.rs` benchmark suite intact for broader historical comparison - Adds targeted Criterion coverage for the main `IN LIST` strategy families, including: - bitmap-style paths for narrow integer cases - branchless and hash/probe-style paths for primitive values at different list-size thresholds - reinterpretation-heavy cases such as floats and timestamps - string and string-view cases, including stage-2 / prefix-collision stress inputs - null-heavy and `NOT IN` scenarios - dictionary and fixed-size-binary coverage used by the broader `IN LIST` implementation ## Are these changes tested? Yes. I validated this PR with: - `cargo fmt --all` - `cargo clippy -p datafusion-physical-expr --all-targets --all-features -- -D warnings` - `cargo test -p datafusion-physical-expr in_list --lib` ## Are there any user-facing changes? No user-facing changes. This PR only adds benchmark coverage for development and performance evaluation.
1 parent 93ae1b8 commit ef9a80c

2 files changed

Lines changed: 1041 additions & 0 deletions

File tree

datafusion/physical-expr/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ rstest = { workspace = true }
7171
harness = false
7272
name = "in_list"
7373

74+
[[bench]]
75+
harness = false
76+
name = "in_list_strategy"
77+
7478
[[bench]]
7579
harness = false
7680
name = "case_when"

0 commit comments

Comments
 (0)