You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "goutamadwant (via GitHub)" <gi...@apache.org> on 2026/09/01 06:10:54 UTC

[PR] perf: extend string IN-list pruning benchmark coverage [datafusion]

goutamadwant opened a new pull request, #24836:
URL: https://github.com/apache/datafusion/pull/24836

   ## Which issue does this PR close?
   
   - Closes #24707.
   
   ## Rationale for this change
   
   The string IN-list pruning benchmark only covered domain sizes 20, 21, 256, and 1,024 with a fixed 4,096 pruning containers. This did not provide the small-list or container-scaling measurements needed by the follow-up work in #24709 and #24710.
   
   This PR extends the benchmark before making any production threshold change, following the contributor guide's recommendation to isolate benchmark additions from the optimization they are intended to evaluate.
   
   ## What changes are included in this PR?
   
   - Add domain sizes 1, 2, 4, 8, and 16 while retaining the existing boundary and large-domain cases.
   - Evaluate each domain at 16, 256, and 4,096 pruning containers.
   - Keep construction benchmarks independent of container count.
   - Preserve the existing 4,096-container Criterion benchmark IDs so historical baselines remain comparable.
   - Validate both representations produce the same pruning results for every evaluation matrix cell outside the timed loop.
   
   The production pruning implementation and its current threshold are unchanged.
   
   ## What is the testing strategy for this PR?
   
   - `./dev/rust_lint.sh`
   - `cargo test --locked -p datafusion-pruning` (95 tests passed)
   - Extended workspace test suite:
   
     ```shell
     RUST_BACKTRACE=1 cargo test --locked --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-cli --workspace --lib --tests --bins --features avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption
     ```
   
   - Full 72-case Criterion matrix:
   
     ```shell
     cargo bench --locked --profile release-nonlto -p datafusion-pruning --bench string_in_list_pruning -- --sample-size 10 --warm-up-time 0.1 --measurement-time 0.2 --noplot
     ```
   
   ## Are there any user-facing changes?
   
   No. This PR only extends benchmark coverage.


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: extend string IN-list pruning benchmark coverage [datafusion]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #24836:
URL: https://github.com/apache/datafusion/pull/24836#issuecomment-5489909315

   ## [Codecov](https://app.codecov.io/gh/apache/datafusion/pull/24836?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 81.57%. Comparing base ([`45b2f73`](https://app.codecov.io/gh/apache/datafusion/commit/45b2f734499baf5e5cd6140894351df3518571a0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b66ac16`](https://app.codecov.io/gh/apache/datafusion/commit/b66ac1698c24fdd20f863556d32a9c5e8420d91a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on main.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##             main   #24836      +/-   ##
   ==========================================
   - Coverage   81.58%   81.57%   -0.01%     
   ==========================================
     Files        1123     1123              
     Lines      406610   406610              
     Branches   406610   406610              
   ==========================================
   - Hits       331716   331708       -8     
   - Misses      55457    55460       +3     
   - Partials    19437    19442       +5     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/datafusion/pull/24836?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: extend string IN-list pruning benchmark coverage [datafusion]

Posted by "kumarUjjawal (via GitHub)" <gi...@apache.org>.
kumarUjjawal commented on PR #24836:
URL: https://github.com/apache/datafusion/pull/24836#issuecomment-5564619067

   Thank you @goutamadwant 


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: extend string IN-list pruning benchmark coverage [datafusion]

Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on code in PR #24836:
URL: https://github.com/apache/datafusion/pull/24836#discussion_r3941711706


##########
datafusion/pruning/benches/string_in_list_pruning.rs:
##########
@@ -101,20 +105,20 @@ struct IntervalStatistics {
 }
 
 impl IntervalStatistics {
-    fn new(domain_size: usize) -> Self {
-        let min = StringViewArray::from_iter_values((0..CONTAINERS).map(|index| {
+    fn new(domain_size: usize, container_count: usize) -> Self {

Review Comment:
   @kumarUjjawal thanks for checking! pushed a fix to address this. each hit/miss interval pair is now mapped to an evenly spaced position across the full domain, including both endpoints, and the distribution repeats only when the pair count exceeds the domain size. For the 1,024-value domain, 16 and 256 containers therefore sample 8 and 128 evenly distributed positions respectively, while 4,096 containers cover all 1,024 positions twice.
   
   resolved the conflicts too. Let me know if you have any other comments. thanks! 



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: extend string IN-list pruning benchmark coverage [datafusion]

Posted by "kumarUjjawal (via GitHub)" <gi...@apache.org>.
kumarUjjawal commented on code in PR #24836:
URL: https://github.com/apache/datafusion/pull/24836#discussion_r3940629867


##########
datafusion/pruning/benches/string_in_list_pruning.rs:
##########
@@ -101,20 +105,20 @@ struct IntervalStatistics {
 }
 
 impl IntervalStatistics {
-    fn new(domain_size: usize) -> Self {
-        let min = StringViewArray::from_iter_values((0..CONTAINERS).map(|index| {
+    fn new(domain_size: usize, container_count: usize) -> Self {

Review Comment:
   The new container-count axis also changes the sampled domain distribution. For a 1,024-value domain, 16 containers exercise only the first 8 values, 256 exercise the first 128, while 4,096 exercise the entire domain twice. That changes binary-search positions, branch behavior, and string-comparison work along with the container count, so the resulting crossover cannot be attributed to container scaling alone. Could we generate evenly distributed positions across the full domain for each container count, then repeat them as needed?



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: extend string IN-list pruning benchmark coverage [datafusion]

Posted by "kumarUjjawal (via GitHub)" <gi...@apache.org>.
kumarUjjawal merged PR #24836:
URL: https://github.com/apache/datafusion/pull/24836


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org