You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2025/06/25 11:10:44 UTC

[PR] Refactor coalesce kernel to use filter builder [arrow-rs]

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

   (This is a draft for now until I have a PR that shows how it works)
   
   # Which issue does this PR close?
   
   - Part of https://github.com/apache/arrow-rs/issues/7762
   
   # Rationale for this change
   
   I would like to reuse some part of the existing filtering logic for https://github.com/apache/arrow-rs/issues/7762. However, it is currently split into a bunch of free functions that all take a `FilterPredicate` argument. By making them methods on `FilterPredicate` I will be able to reuse the code
   
   # What changes are included in this PR?
   
   1. Move `filter_*` methods into functions on `FilterPredicate` (note all the methods are still private so this doesn't change the public API)
   
   # Are these changes tested?
   Existing CI covers them functionally
   
   I will run performance tests to ensure we don't mess up performance
   
   
   # Are there any user-facing changes?
   There are no intended user facing changes


-- 
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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3285629989

   🤖 `./gh_compare_arrow.sh` [Benchmark Script](https://github.com/alamb/datafusion-benchmarking/blob/main/scripts/gh_compare_arrow.sh) Running
   Linux aal-dev 6.14.0-1014-gcp #15~24.04.1-Ubuntu SMP Fri Jul 25 23:26:08 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
   Comparing alamb/filter_predicate (08e9269b30211749a3d8247866e1f951caecebff) to aa626e12de8bc0d0f56b5349239cae1be8d1a195 [diff](https://github.com/apache/arrow-rs/compare/aa626e12de8bc0d0f56b5349239cae1be8d1a195..08e9269b30211749a3d8247866e1f951caecebff)
   BENCH_NAME=comparison_kernels
   BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental --bench comparison_kernels 
   BENCH_FILTER=
   BENCH_BRANCH_NAME=alamb_filter_predicate
   Results will be posted here when complete
   


-- 
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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3285445404

   🤖 `./gh_compare_arrow.sh` [Benchmark Script](https://github.com/alamb/datafusion-benchmarking/blob/main/scripts/gh_compare_arrow.sh) Running
   Linux aal-dev 6.14.0-1014-gcp #15~24.04.1-Ubuntu SMP Fri Jul 25 23:26:08 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
   Comparing alamb/filter_predicate (08e9269b30211749a3d8247866e1f951caecebff) to aa626e12de8bc0d0f56b5349239cae1be8d1a195 [diff](https://github.com/apache/arrow-rs/compare/aa626e12de8bc0d0f56b5349239cae1be8d1a195..08e9269b30211749a3d8247866e1f951caecebff)
   BENCH_NAME=arrow_reader_clickbench
   BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental --bench arrow_reader_clickbench 
   BENCH_FILTER=
   BENCH_BRANCH_NAME=alamb_filter_predicate
   Results will be posted here when complete
   


-- 
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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed pull request #7771: Refactor filter functions as methods on `FilterPredicate` struct
URL: https://github.com/apache/arrow-rs/pull/7771


-- 
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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3285550913

   🤖: Benchmark completed
   
   <details><summary>Details</summary>
   <p>
   
   
   ```
   group                                alamb_filter_predicate                 main
   -----                                ----------------------                 ----
   arrow_reader_clickbench/async/Q1     1.01      2.4±0.02ms        ? ?/sec    1.00      2.4±0.01ms        ? ?/sec
   arrow_reader_clickbench/async/Q10    1.00     13.9±0.64ms        ? ?/sec    1.05     14.5±0.54ms        ? ?/sec
   arrow_reader_clickbench/async/Q11    1.00     16.1±0.46ms        ? ?/sec    1.01     16.3±0.50ms        ? ?/sec
   arrow_reader_clickbench/async/Q12    1.00     28.5±0.37ms        ? ?/sec    1.00     28.6±0.40ms        ? ?/sec
   arrow_reader_clickbench/async/Q13    1.00     41.9±0.40ms        ? ?/sec    1.01     42.2±0.38ms        ? ?/sec
   arrow_reader_clickbench/async/Q14    1.00     39.4±0.43ms        ? ?/sec    1.01     39.8±0.41ms        ? ?/sec
   arrow_reader_clickbench/async/Q19    1.00      5.7±0.13ms        ? ?/sec    1.02      5.9±0.11ms        ? ?/sec
   arrow_reader_clickbench/async/Q20    1.10    147.4±7.79ms        ? ?/sec    1.00    134.6±4.81ms        ? ?/sec
   arrow_reader_clickbench/async/Q21    1.08   174.7±14.48ms        ? ?/sec    1.00   161.3±11.96ms        ? ?/sec
   arrow_reader_clickbench/async/Q22    1.00   284.7±13.27ms        ? ?/sec    1.03   292.3±10.36ms        ? ?/sec
   arrow_reader_clickbench/async/Q23    1.00    435.9±2.98ms        ? ?/sec    1.01    440.9±3.16ms        ? ?/sec
   arrow_reader_clickbench/async/Q24    1.00     46.6±0.58ms        ? ?/sec    1.00     46.7±0.73ms        ? ?/sec
   arrow_reader_clickbench/async/Q27    1.00    106.4±0.52ms        ? ?/sec    1.01    107.7±1.07ms        ? ?/sec
   arrow_reader_clickbench/async/Q28    1.00    106.9±0.63ms        ? ?/sec    1.01    107.7±0.94ms        ? ?/sec
   arrow_reader_clickbench/async/Q30    1.01     62.4±0.52ms        ? ?/sec    1.00     61.9±0.57ms        ? ?/sec
   arrow_reader_clickbench/async/Q36    1.01    130.6±0.67ms        ? ?/sec    1.00    129.7±0.67ms        ? ?/sec
   arrow_reader_clickbench/async/Q37    1.01    104.5±0.51ms        ? ?/sec    1.00    103.9±0.44ms        ? ?/sec
   arrow_reader_clickbench/async/Q38    1.00     40.0±0.33ms        ? ?/sec    1.01     40.5±0.37ms        ? ?/sec
   arrow_reader_clickbench/async/Q39    1.00     49.6±0.44ms        ? ?/sec    1.00     49.4±0.37ms        ? ?/sec
   arrow_reader_clickbench/async/Q40    1.01     51.3±0.55ms        ? ?/sec    1.00     50.8±0.59ms        ? ?/sec
   arrow_reader_clickbench/async/Q41    1.01     41.3±0.42ms        ? ?/sec    1.00     40.7±0.43ms        ? ?/sec
   arrow_reader_clickbench/async/Q42    1.01     14.7±0.18ms        ? ?/sec    1.00     14.6±0.12ms        ? ?/sec
   arrow_reader_clickbench/sync/Q1      1.00      2.2±0.00ms        ? ?/sec    1.00      2.2±0.01ms        ? ?/sec
   arrow_reader_clickbench/sync/Q10     1.00      9.9±0.06ms        ? ?/sec    1.00      9.8±0.08ms        ? ?/sec
   arrow_reader_clickbench/sync/Q11     1.00     11.7±0.08ms        ? ?/sec    1.00     11.7±0.10ms        ? ?/sec
   arrow_reader_clickbench/sync/Q12     1.00     38.9±0.35ms        ? ?/sec    1.00     38.8±0.39ms        ? ?/sec
   arrow_reader_clickbench/sync/Q13     1.01     52.2±0.57ms        ? ?/sec    1.00     51.6±0.62ms        ? ?/sec
   arrow_reader_clickbench/sync/Q14     1.00     50.1±0.45ms        ? ?/sec    1.00     49.9±0.36ms        ? ?/sec
   arrow_reader_clickbench/sync/Q19     1.00      4.3±0.04ms        ? ?/sec    1.00      4.3±0.08ms        ? ?/sec
   arrow_reader_clickbench/sync/Q20     1.00    181.2±0.79ms        ? ?/sec    1.00    180.6±0.87ms        ? ?/sec
   arrow_reader_clickbench/sync/Q21     1.00    240.7±1.16ms        ? ?/sec    1.01    242.6±2.22ms        ? ?/sec
   arrow_reader_clickbench/sync/Q22     1.00    489.9±3.82ms        ? ?/sec    1.01    495.5±5.07ms        ? ?/sec
   arrow_reader_clickbench/sync/Q23     1.00   446.0±14.78ms        ? ?/sec    1.00   447.0±10.31ms        ? ?/sec
   arrow_reader_clickbench/sync/Q24     1.00     54.1±0.97ms        ? ?/sec    1.01     54.8±0.81ms        ? ?/sec
   arrow_reader_clickbench/sync/Q27     1.00    158.7±1.01ms        ? ?/sec    1.01    160.3±1.63ms        ? ?/sec
   arrow_reader_clickbench/sync/Q28     1.00    155.5±1.27ms        ? ?/sec    1.00    155.1±1.11ms        ? ?/sec
   arrow_reader_clickbench/sync/Q30     1.01     61.5±0.33ms        ? ?/sec    1.00     60.9±0.36ms        ? ?/sec
   arrow_reader_clickbench/sync/Q36     1.01    164.2±1.22ms        ? ?/sec    1.00    163.1±1.19ms        ? ?/sec
   arrow_reader_clickbench/sync/Q37     1.00     95.0±0.66ms        ? ?/sec    1.01     96.0±0.60ms        ? ?/sec
   arrow_reader_clickbench/sync/Q38     1.00     32.4±0.23ms        ? ?/sec    1.02     33.0±0.17ms        ? ?/sec
   arrow_reader_clickbench/sync/Q39     1.00     35.4±0.42ms        ? ?/sec    1.02     36.0±0.57ms        ? ?/sec
   arrow_reader_clickbench/sync/Q40     1.00     50.4±0.57ms        ? ?/sec    1.02     51.5±0.66ms        ? ?/sec
   arrow_reader_clickbench/sync/Q41     1.00     38.2±0.56ms        ? ?/sec    1.01     38.7±0.55ms        ? ?/sec
   arrow_reader_clickbench/sync/Q42     1.00     13.8±0.18ms        ? ?/sec    1.01     13.9±0.11ms        ? ?/sec
   ```
   
   
   </p>
   </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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3285629751

   🤖: Benchmark completed
   
   <details><summary>Details</summary>
   <p>
   
   
   ```
   group                                                                         alamb_filter_predicate                 main
   -----                                                                         ----------------------                 ----
   filter context decimal128 (kept 1/2)                                          1.02     54.6±6.99µs        ? ?/sec    1.00     53.4±7.39µs        ? ?/sec
   filter context decimal128 high selectivity (kept 1023/1024)                   1.02     52.1±1.73µs        ? ?/sec    1.00     51.1±1.31µs        ? ?/sec
   filter context decimal128 low selectivity (kept 1/1024)                       1.00    230.9±0.32ns        ? ?/sec    1.01    232.1±0.32ns        ? ?/sec
   filter context f32 (kept 1/2)                                                 1.00     96.6±0.26µs        ? ?/sec    1.02     98.1±0.17µs        ? ?/sec
   filter context f32 high selectivity (kept 1023/1024)                          1.00     12.9±0.39µs        ? ?/sec    1.04     13.4±0.39µs        ? ?/sec
   filter context f32 low selectivity (kept 1/1024)                              1.00    430.9±0.55ns        ? ?/sec    1.02    439.9±0.45ns        ? ?/sec
   filter context fsb with value length 20 (kept 1/2)                            1.00     79.4±0.13µs        ? ?/sec    1.00     79.5±0.09µs        ? ?/sec
   filter context fsb with value length 20 high selectivity (kept 1023/1024)     1.00     79.4±0.50µs        ? ?/sec    1.00     79.6±0.44µs        ? ?/sec
   filter context fsb with value length 20 low selectivity (kept 1/1024)         1.00     79.4±0.08µs        ? ?/sec    1.00     79.6±0.16µs        ? ?/sec
   filter context fsb with value length 5 (kept 1/2)                             1.00     79.5±0.15µs        ? ?/sec    1.00     79.6±0.46µs        ? ?/sec
   filter context fsb with value length 5 high selectivity (kept 1023/1024)      1.00     79.4±0.09µs        ? ?/sec    1.00     79.6±0.51µs        ? ?/sec
   filter context fsb with value length 5 low selectivity (kept 1/1024)          1.00     79.4±0.47µs        ? ?/sec    1.00     79.6±0.56µs        ? ?/sec
   filter context fsb with value length 50 (kept 1/2)                            1.00     79.4±0.10µs        ? ?/sec    1.00     79.7±0.54µs        ? ?/sec
   filter context fsb with value length 50 high selectivity (kept 1023/1024)     1.00     79.3±0.08µs        ? ?/sec    1.00     79.7±0.52µs        ? ?/sec
   filter context fsb with value length 50 low selectivity (kept 1/1024)         1.00     79.4±0.16µs        ? ?/sec    1.00     79.6±0.53µs        ? ?/sec
   filter context i32 (kept 1/2)                                                 1.01     16.7±0.11µs        ? ?/sec    1.00     16.6±0.09µs        ? ?/sec
   filter context i32 high selectivity (kept 1023/1024)                          1.06      6.5±0.31µs        ? ?/sec    1.00      6.2±0.32µs        ? ?/sec
   filter context i32 low selectivity (kept 1/1024)                              1.01    237.8±0.31ns        ? ?/sec    1.00    234.3±1.50ns        ? ?/sec
   filter context i32 w NULLs (kept 1/2)                                         1.00     97.1±0.20µs        ? ?/sec    1.00     97.0±0.19µs        ? ?/sec
   filter context i32 w NULLs high selectivity (kept 1023/1024)                  1.00     13.2±0.34µs        ? ?/sec    1.06     14.0±0.37µs        ? ?/sec
   filter context i32 w NULLs low selectivity (kept 1/1024)                      1.00    430.4±0.50ns        ? ?/sec    1.23    528.4±1.34ns        ? ?/sec
   filter context mixed string view (kept 1/2)                                   1.00    122.0±4.65µs        ? ?/sec    1.08    131.8±5.28µs        ? ?/sec
   filter context mixed string view high selectivity (kept 1023/1024)            1.00     59.5±0.77µs        ? ?/sec    1.01     59.8±1.90µs        ? ?/sec
   filter context mixed string view low selectivity (kept 1/1024)                1.00    646.8±1.16ns        ? ?/sec    1.01    653.7±2.47ns        ? ?/sec
   filter context short string view (kept 1/2)                                   1.00    126.6±5.94µs        ? ?/sec    1.03    130.1±6.33µs        ? ?/sec
   filter context short string view high selectivity (kept 1023/1024)            1.00     56.9±0.77µs        ? ?/sec    1.01     57.6±1.73µs        ? ?/sec
   filter context short string view low selectivity (kept 1/1024)                1.00    462.0±0.73ns        ? ?/sec    1.00    463.8±0.66ns        ? ?/sec
   filter context string (kept 1/2)                                              1.01   617.5±16.01µs        ? ?/sec    1.00   610.8±11.91µs        ? ?/sec
   filter context string dictionary (kept 1/2)                                   1.01     17.4±0.17µs        ? ?/sec    1.00     17.3±0.06µs        ? ?/sec
   filter context string dictionary high selectivity (kept 1023/1024)            1.00      7.2±0.29µs        ? ?/sec    1.04      7.5±0.24µs        ? ?/sec
   filter context string dictionary low selectivity (kept 1/1024)                1.03   831.2±12.50ns        ? ?/sec    1.00    803.4±1.56ns        ? ?/sec
   filter context string dictionary w NULLs (kept 1/2)                           1.00     98.0±1.52µs        ? ?/sec    1.00     97.9±0.22µs        ? ?/sec
   filter context string dictionary w NULLs high selectivity (kept 1023/1024)    1.01     14.2±0.25µs        ? ?/sec    1.00     14.0±0.36µs        ? ?/sec
   filter context string dictionary w NULLs low selectivity (kept 1/1024)        1.02   1049.5±2.72ns        ? ?/sec    1.00   1033.7±1.38ns        ? ?/sec
   filter context string high selectivity (kept 1023/1024)                       1.00   687.8±24.46µs        ? ?/sec    1.00   691.0±16.52µs        ? ?/sec
   filter context string low selectivity (kept 1/1024)                           1.00   1045.3±1.36ns        ? ?/sec    1.02   1064.9±0.95ns        ? ?/sec
   filter context u8 (kept 1/2)                                                  1.00     15.2±0.10µs        ? ?/sec    1.00     15.2±0.11µs        ? ?/sec
   filter context u8 high selectivity (kept 1023/1024)                           1.00  1798.3±12.39ns        ? ?/sec    1.04  1878.2±10.99ns        ? ?/sec
   filter context u8 low selectivity (kept 1/1024)                               1.01    227.1±1.57ns        ? ?/sec    1.00    225.9±0.37ns        ? ?/sec
   filter context u8 w NULLs (kept 1/2)                                          1.00     95.1±0.18µs        ? ?/sec    1.00     95.1±0.14µs        ? ?/sec
   filter context u8 w NULLs high selectivity (kept 1023/1024)                   1.00      8.3±0.01µs        ? ?/sec    1.04      8.6±0.02µs        ? ?/sec
   filter context u8 w NULLs low selectivity (kept 1/1024)                       1.00    420.1±0.40ns        ? ?/sec    1.24    523.0±1.15ns        ? ?/sec
   filter decimal128 (kept 1/2)                                                  1.00     53.9±4.43µs        ? ?/sec    1.01     54.4±4.06µs        ? ?/sec
   filter decimal128 high selectivity (kept 1023/1024)                           1.00     54.9±2.23µs        ? ?/sec    1.00     54.7±1.90µs        ? ?/sec
   filter decimal128 low selectivity (kept 1/1024)                               1.01      3.0±0.02µs        ? ?/sec    1.00      2.9±0.01µs        ? ?/sec
   filter f32 (kept 1/2)                                                         1.00    163.8±0.36µs        ? ?/sec    1.00    163.7±0.31µs        ? ?/sec
   filter fsb with value length 20 (kept 1/2)                                    1.00    145.3±0.63µs        ? ?/sec    1.00    145.5±2.50µs        ? ?/sec
   filter fsb with value length 20 high selectivity (kept 1023/1024)             1.00     70.9±2.98µs        ? ?/sec    1.03     72.9±3.28µs        ? ?/sec
   filter fsb with value length 20 low selectivity (kept 1/1024)                 1.01      3.4±0.01µs        ? ?/sec    1.00      3.4±0.01µs        ? ?/sec
   filter fsb with value length 5 (kept 1/2)                                     1.03    155.7±1.49µs        ? ?/sec    1.00    150.6±1.30µs        ? ?/sec
   filter fsb with value length 5 high selectivity (kept 1023/1024)              1.00     10.6±0.39µs        ? ?/sec    1.05     11.2±0.37µs        ? ?/sec
   filter fsb with value length 5 low selectivity (kept 1/1024)                  1.00      3.4±0.01µs        ? ?/sec    1.00      3.4±0.03µs        ? ?/sec
   filter fsb with value length 50 (kept 1/2)                                    1.04    175.5±6.61µs        ? ?/sec    1.00    169.4±7.16µs        ? ?/sec
   filter fsb with value length 50 high selectivity (kept 1023/1024)             1.00    210.2±4.69µs        ? ?/sec    1.05    220.0±6.88µs        ? ?/sec
   filter fsb with value length 50 low selectivity (kept 1/1024)                 1.00      3.4±0.01µs        ? ?/sec    1.01      3.4±0.03µs        ? ?/sec
   filter i32 (kept 1/2)                                                         1.00     53.6±0.36µs        ? ?/sec    1.00     53.6±0.12µs        ? ?/sec
   filter i32 high selectivity (kept 1023/1024)                                  1.04      9.0±0.29µs        ? ?/sec    1.00      8.6±0.36µs        ? ?/sec
   filter i32 low selectivity (kept 1/1024)                                      1.00      3.0±0.01µs        ? ?/sec    1.02      3.0±0.01µs        ? ?/sec
   filter optimize (kept 1/2)                                                    1.01     53.9±0.07µs        ? ?/sec    1.00     53.5±0.12µs        ? ?/sec
   filter optimize high selectivity (kept 1023/1024)                             1.09      3.0±0.01µs        ? ?/sec    1.00      2.8±0.01µs        ? ?/sec
   filter optimize low selectivity (kept 1/1024)                                 1.00      2.8±0.01µs        ? ?/sec    1.10      3.1±0.01µs        ? ?/sec
   filter run array (kept 1/2)                                                   1.00    415.4±1.59µs        ? ?/sec    1.00    416.4±1.80µs        ? ?/sec
   filter run array high selectivity (kept 1023/1024)                            1.00    431.6±2.36µs        ? ?/sec    1.00    433.7±1.96µs        ? ?/sec
   filter run array low selectivity (kept 1/1024)                                1.00    335.1±2.09µs        ? ?/sec    1.00    335.1±0.95µs        ? ?/sec
   filter single record batch                                                    1.00     46.3±0.07µs        ? ?/sec    1.00     46.4±0.08µs        ? ?/sec
   filter u8 (kept 1/2)                                                          1.01     45.5±0.07µs        ? ?/sec    1.00     45.0±0.06µs        ? ?/sec
   filter u8 high selectivity (kept 1023/1024)                                   1.03      4.0±0.01µs        ? ?/sec    1.00      3.9±0.04µs        ? ?/sec
   filter u8 low selectivity (kept 1/1024)                                       1.00      3.1±0.01µs        ? ?/sec    1.01      3.1±0.21µs        ? ?/sec
   ```
   
   
   </p>
   </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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3887063198

   Not sure this is useful


-- 
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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3004534663

   > 🤖: Benchmark completed
   
   Wow those are some noisy benchmarks 🤔 


-- 
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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3004446973

   🤖: Benchmark completed
   
   <details><summary>Details</summary>
   <p>
   
   
   ```
   group                                                                         alamb_filter_predicate                 main
   -----                                                                         ----------------------                 ----
   filter context decimal128 (kept 1/2)                                          1.00     39.9±2.68µs        ? ?/sec    1.07     42.5±4.51µs        ? ?/sec
   filter context decimal128 high selectivity (kept 1023/1024)                   1.01     51.6±1.18µs        ? ?/sec    1.00     51.0±1.23µs        ? ?/sec
   filter context decimal128 low selectivity (kept 1/1024)                       1.04    261.4±0.35ns        ? ?/sec    1.00    252.4±0.31ns        ? ?/sec
   filter context f32 (kept 1/2)                                                 1.00     69.4±0.12µs        ? ?/sec    1.41     98.1±0.21µs        ? ?/sec
   filter context f32 high selectivity (kept 1023/1024)                          1.04     13.8±0.55µs        ? ?/sec    1.00     13.2±0.65µs        ? ?/sec
   filter context f32 low selectivity (kept 1/1024)                              1.00    448.0±0.61ns        ? ?/sec    1.10    492.6±0.57ns        ? ?/sec
   filter context fsb with value length 20 (kept 1/2)                            1.00     42.5±0.09µs        ? ?/sec    1.67     70.9±0.14µs        ? ?/sec
   filter context fsb with value length 20 high selectivity (kept 1023/1024)     1.00     42.5±0.13µs        ? ?/sec    1.67     70.9±0.09µs        ? ?/sec
   filter context fsb with value length 20 low selectivity (kept 1/1024)         1.00     42.4±0.10µs        ? ?/sec    1.67     70.9±0.14µs        ? ?/sec
   filter context fsb with value length 5 (kept 1/2)                             1.00     42.4±0.11µs        ? ?/sec    1.67     71.0±0.12µs        ? ?/sec
   filter context fsb with value length 5 high selectivity (kept 1023/1024)      1.00     42.4±0.07µs        ? ?/sec    1.67     70.9±0.10µs        ? ?/sec
   filter context fsb with value length 5 low selectivity (kept 1/1024)          1.00     42.4±0.08µs        ? ?/sec    1.67     71.0±0.14µs        ? ?/sec
   filter context fsb with value length 50 (kept 1/2)                            1.00     42.4±0.10µs        ? ?/sec    1.67     71.0±0.15µs        ? ?/sec
   filter context fsb with value length 50 high selectivity (kept 1023/1024)     1.00     42.4±0.08µs        ? ?/sec    1.67     70.9±0.10µs        ? ?/sec
   filter context fsb with value length 50 low selectivity (kept 1/1024)         1.00     42.4±0.08µs        ? ?/sec    1.67     71.0±0.09µs        ? ?/sec
   filter context i32 (kept 1/2)                                                 1.01     22.9±0.06µs        ? ?/sec    1.00     22.7±0.05µs        ? ?/sec
   filter context i32 high selectivity (kept 1023/1024)                          1.04      6.5±0.46µs        ? ?/sec    1.00      6.3±0.39µs        ? ?/sec
   filter context i32 low selectivity (kept 1/1024)                              1.02    262.5±0.60ns        ? ?/sec    1.00    257.1±0.32ns        ? ?/sec
   filter context i32 w NULLs (kept 1/2)                                         1.00     65.7±0.10µs        ? ?/sec    1.43     94.2±0.21µs        ? ?/sec
   filter context i32 w NULLs high selectivity (kept 1023/1024)                  1.02     13.4±0.47µs        ? ?/sec    1.00     13.1±0.40µs        ? ?/sec
   filter context i32 w NULLs low selectivity (kept 1/1024)                      1.00    455.5±0.72ns        ? ?/sec    1.06    483.5±0.58ns        ? ?/sec
   filter context mixed string view (kept 1/2)                                   1.00     90.1±7.57µs        ? ?/sec    1.35    121.5±6.20µs        ? ?/sec
   filter context mixed string view high selectivity (kept 1023/1024)            1.00     60.2±0.55µs        ? ?/sec    1.00     60.0±0.59µs        ? ?/sec
   filter context mixed string view low selectivity (kept 1/1024)                1.00    634.7±0.60ns        ? ?/sec    1.09    689.8±1.07ns        ? ?/sec
   filter context short string view (kept 1/2)                                   1.00     87.2±7.12µs        ? ?/sec    1.40    122.5±6.49µs        ? ?/sec
   filter context short string view high selectivity (kept 1023/1024)            1.01     58.6±0.76µs        ? ?/sec    1.00     58.2±1.06µs        ? ?/sec
   filter context short string view low selectivity (kept 1/1024)                1.00    448.4±0.63ns        ? ?/sec    1.12    501.2±0.76ns        ? ?/sec
   filter context string (kept 1/2)                                              1.00    550.9±4.02µs        ? ?/sec    1.12   614.6±13.48µs        ? ?/sec
   filter context string dictionary (kept 1/2)                                   1.00     23.3±0.05µs        ? ?/sec    1.00     23.3±0.06µs        ? ?/sec
   filter context string dictionary high selectivity (kept 1023/1024)            1.00      7.1±0.35µs        ? ?/sec    1.06      7.5±0.36µs        ? ?/sec
   filter context string dictionary low selectivity (kept 1/1024)                1.00    847.8±1.87ns        ? ?/sec    1.01    852.1±4.13ns        ? ?/sec
   filter context string dictionary w NULLs (kept 1/2)                           1.00     66.6±0.15µs        ? ?/sec    1.43     95.0±0.33µs        ? ?/sec
   filter context string dictionary w NULLs high selectivity (kept 1023/1024)    1.07     14.7±0.48µs        ? ?/sec    1.00     13.8±0.37µs        ? ?/sec
   filter context string dictionary w NULLs low selectivity (kept 1/1024)        1.00   1062.8±1.95ns        ? ?/sec    1.04   1106.0±3.81ns        ? ?/sec
   filter context string high selectivity (kept 1023/1024)                       1.00   627.0±16.33µs        ? ?/sec    1.06   662.8±36.08µs        ? ?/sec
   filter context string low selectivity (kept 1/1024)                           1.00   1089.5±6.02ns        ? ?/sec    1.04   1135.2±1.61ns        ? ?/sec
   filter context u8 (kept 1/2)                                                  1.00     18.9±0.04µs        ? ?/sec    1.00     18.9±0.05µs        ? ?/sec
   filter context u8 high selectivity (kept 1023/1024)                           1.01   1814.5±8.56ns        ? ?/sec    1.00  1804.2±11.39ns        ? ?/sec
   filter context u8 low selectivity (kept 1/1024)                               1.01    250.5±0.38ns        ? ?/sec    1.00    247.5±0.92ns        ? ?/sec
   filter context u8 w NULLs (kept 1/2)                                          1.00     61.6±0.11µs        ? ?/sec    1.46     90.2±0.22µs        ? ?/sec
   filter context u8 w NULLs high selectivity (kept 1023/1024)                   1.06      8.6±0.01µs        ? ?/sec    1.00      8.2±0.06µs        ? ?/sec
   filter context u8 w NULLs low selectivity (kept 1/1024)                       1.00    437.3±3.15ns        ? ?/sec    1.30    569.5±0.58ns        ? ?/sec
   filter decimal128 (kept 1/2)                                                  1.00     94.7±0.35µs        ? ?/sec    1.03     97.3±0.34µs        ? ?/sec
   filter decimal128 high selectivity (kept 1023/1024)                           1.00     52.3±1.98µs        ? ?/sec    1.00     52.3±1.55µs        ? ?/sec
   filter decimal128 low selectivity (kept 1/1024)                               1.23      3.0±0.01µs        ? ?/sec    1.00      2.5±0.01µs        ? ?/sec
   filter f32 (kept 1/2)                                                         1.18    230.6±0.32µs        ? ?/sec    1.00    195.9±0.58µs        ? ?/sec
   filter fsb with value length 20 (kept 1/2)                                    1.00    132.9±0.30µs        ? ?/sec    1.14    151.5±0.38µs        ? ?/sec
   filter fsb with value length 20 high selectivity (kept 1023/1024)             1.00     69.5±2.02µs        ? ?/sec    1.05     73.0±1.71µs        ? ?/sec
   filter fsb with value length 20 low selectivity (kept 1/1024)                 1.24      3.2±0.01µs        ? ?/sec    1.00      2.6±0.00µs        ? ?/sec
   filter fsb with value length 5 (kept 1/2)                                     1.00    131.2±0.23µs        ? ?/sec    1.17    152.9±0.28µs        ? ?/sec
   filter fsb with value length 5 high selectivity (kept 1023/1024)              1.00     11.1±0.63µs        ? ?/sec    1.02     11.3±0.46µs        ? ?/sec
   filter fsb with value length 5 low selectivity (kept 1/1024)                  1.23      3.1±0.01µs        ? ?/sec    1.00      2.5±0.01µs        ? ?/sec
   filter fsb with value length 50 (kept 1/2)                                    1.00    183.0±7.00µs        ? ?/sec    1.06    194.0±9.68µs        ? ?/sec
   filter fsb with value length 50 high selectivity (kept 1023/1024)             1.00   213.1±10.85µs        ? ?/sec    1.07    228.5±4.31µs        ? ?/sec
   filter fsb with value length 50 low selectivity (kept 1/1024)                 1.22      3.1±0.01µs        ? ?/sec    1.00      2.6±0.00µs        ? ?/sec
   filter i32 (kept 1/2)                                                         1.01     92.3±0.13µs        ? ?/sec    1.00     91.5±0.33µs        ? ?/sec
   filter i32 high selectivity (kept 1023/1024)                                  1.00      8.4±0.34µs        ? ?/sec    1.02      8.5±0.21µs        ? ?/sec
   filter i32 low selectivity (kept 1/1024)                                      1.25      3.1±0.00µs        ? ?/sec    1.00      2.5±0.01µs        ? ?/sec
   filter optimize (kept 1/2)                                                    1.02     84.1±0.21µs        ? ?/sec    1.00     82.5±0.31µs        ? ?/sec
   filter optimize high selectivity (kept 1023/1024)                             1.00      2.7±0.01µs        ? ?/sec    1.16      3.1±0.01µs        ? ?/sec
   filter optimize low selectivity (kept 1/1024)                                 1.31      2.8±0.00µs        ? ?/sec    1.00      2.1±0.01µs        ? ?/sec
   filter run array (kept 1/2)                                                   1.00    442.5±0.85µs        ? ?/sec    1.06    469.7±0.98µs        ? ?/sec
   filter run array high selectivity (kept 1023/1024)                            1.00    397.6±1.03µs        ? ?/sec    1.13    448.1±1.42µs        ? ?/sec
   filter run array low selectivity (kept 1/1024)                                1.00    333.5±0.76µs        ? ?/sec    1.00    332.9±0.91µs        ? ?/sec
   filter single record batch                                                    1.02     93.3±0.25µs        ? ?/sec    1.00     91.6±0.19µs        ? ?/sec
   filter u8 (kept 1/2)                                                          1.00     91.9±0.10µs        ? ?/sec    1.04     95.4±0.21µs        ? ?/sec
   filter u8 high selectivity (kept 1023/1024)                                   1.00      3.8±0.01µs        ? ?/sec    1.09      4.1±0.01µs        ? ?/sec
   filter u8 low selectivity (kept 1/1024)                                       1.24      3.0±0.01µs        ? ?/sec    1.00      2.5±0.01µs        ? ?/sec
   ```
   
   
   </p>
   </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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3004623043

   🤖: Benchmark completed
   
   <details><summary>Details</summary>
   <p>
   
   
   ```
   group                                                                         alamb_filter_predicate                 main
   -----                                                                         ----------------------                 ----
   filter context decimal128 (kept 1/2)                                          1.17     51.6±7.87µs        ? ?/sec    1.00     44.0±7.01µs        ? ?/sec
   filter context decimal128 high selectivity (kept 1023/1024)                   1.00     50.5±0.51µs        ? ?/sec    1.01     51.0±1.32µs        ? ?/sec
   filter context decimal128 low selectivity (kept 1/1024)                       1.00    249.6±0.41ns        ? ?/sec    1.02    254.1±0.36ns        ? ?/sec
   filter context f32 (kept 1/2)                                                 1.00     69.4±0.12µs        ? ?/sec    1.41     98.0±0.18µs        ? ?/sec
   filter context f32 high selectivity (kept 1023/1024)                          1.00     13.7±0.60µs        ? ?/sec    1.01     13.8±0.50µs        ? ?/sec
   filter context f32 low selectivity (kept 1/1024)                              1.00    448.7±0.36ns        ? ?/sec    1.10    494.8±1.85ns        ? ?/sec
   filter context fsb with value length 20 (kept 1/2)                            1.00     42.4±0.07µs        ? ?/sec    1.67     71.0±0.12µs        ? ?/sec
   filter context fsb with value length 20 high selectivity (kept 1023/1024)     1.00     42.4±0.05µs        ? ?/sec    1.67     71.0±0.16µs        ? ?/sec
   filter context fsb with value length 20 low selectivity (kept 1/1024)         1.00     42.4±0.06µs        ? ?/sec    1.67     71.0±0.16µs        ? ?/sec
   filter context fsb with value length 5 (kept 1/2)                             1.00     42.4±0.06µs        ? ?/sec    1.67     71.0±0.15µs        ? ?/sec
   filter context fsb with value length 5 high selectivity (kept 1023/1024)      1.00     42.4±0.10µs        ? ?/sec    1.68     71.1±0.55µs        ? ?/sec
   filter context fsb with value length 5 low selectivity (kept 1/1024)          1.00     42.4±0.06µs        ? ?/sec    1.67     71.0±0.17µs        ? ?/sec
   filter context fsb with value length 50 (kept 1/2)                            1.00     42.5±0.07µs        ? ?/sec    1.67     71.1±0.32µs        ? ?/sec
   filter context fsb with value length 50 high selectivity (kept 1023/1024)     1.00     42.5±0.21µs        ? ?/sec    1.67     71.0±0.14µs        ? ?/sec
   filter context fsb with value length 50 low selectivity (kept 1/1024)         1.00     42.4±0.07µs        ? ?/sec    1.67     71.0±0.10µs        ? ?/sec
   filter context i32 (kept 1/2)                                                 1.00     22.8±0.05µs        ? ?/sec    1.00     22.8±0.06µs        ? ?/sec
   filter context i32 high selectivity (kept 1023/1024)                          1.00      6.4±0.36µs        ? ?/sec    1.02      6.5±0.38µs        ? ?/sec
   filter context i32 low selectivity (kept 1/1024)                              1.01    258.7±0.39ns        ? ?/sec    1.00    256.0±0.41ns        ? ?/sec
   filter context i32 w NULLs (kept 1/2)                                         1.00     65.7±0.13µs        ? ?/sec    1.43     94.1±0.19µs        ? ?/sec
   filter context i32 w NULLs high selectivity (kept 1023/1024)                  1.05     13.6±0.59µs        ? ?/sec    1.00     12.9±0.43µs        ? ?/sec
   filter context i32 w NULLs low selectivity (kept 1/1024)                      1.00    458.4±0.73ns        ? ?/sec    1.05    482.2±0.59ns        ? ?/sec
   filter context mixed string view (kept 1/2)                                   1.00     89.3±6.68µs        ? ?/sec    1.32    118.1±8.03µs        ? ?/sec
   filter context mixed string view high selectivity (kept 1023/1024)            1.00     58.2±1.24µs        ? ?/sec    1.00     58.2±1.79µs        ? ?/sec
   filter context mixed string view low selectivity (kept 1/1024)                1.00    629.4±0.78ns        ? ?/sec    1.08    679.1±2.28ns        ? ?/sec
   filter context short string view (kept 1/2)                                   1.00     85.3±5.36µs        ? ?/sec    1.32    112.3±4.76µs        ? ?/sec
   filter context short string view high selectivity (kept 1023/1024)            1.00     57.5±2.10µs        ? ?/sec    1.02     58.4±1.61µs        ? ?/sec
   filter context short string view low selectivity (kept 1/1024)                1.00    447.3±0.47ns        ? ?/sec    1.09    488.2±1.06ns        ? ?/sec
   filter context string (kept 1/2)                                              1.00   559.3±13.55µs        ? ?/sec    1.08   602.1±14.95µs        ? ?/sec
   filter context string dictionary (kept 1/2)                                   1.00     23.2±0.04µs        ? ?/sec    1.00     23.3±0.04µs        ? ?/sec
   filter context string dictionary high selectivity (kept 1023/1024)            1.00      7.1±0.57µs        ? ?/sec    1.05      7.5±0.30µs        ? ?/sec
   filter context string dictionary low selectivity (kept 1/1024)                1.00    818.6±1.02ns        ? ?/sec    1.00    821.6±1.80ns        ? ?/sec
   filter context string dictionary w NULLs (kept 1/2)                           1.00     66.6±0.11µs        ? ?/sec    1.43     95.0±0.22µs        ? ?/sec
   filter context string dictionary w NULLs high selectivity (kept 1023/1024)    1.05     14.7±0.45µs        ? ?/sec    1.00     13.9±0.33µs        ? ?/sec
   filter context string dictionary w NULLs low selectivity (kept 1/1024)        1.00   1031.3±1.18ns        ? ?/sec    1.04   1076.1±2.31ns        ? ?/sec
   filter context string high selectivity (kept 1023/1024)                       1.00   638.6±18.95µs        ? ?/sec    1.04   665.2±19.95µs        ? ?/sec
   filter context string low selectivity (kept 1/1024)                           1.00    880.9±2.19ns        ? ?/sec    1.39   1222.5±3.96ns        ? ?/sec
   filter context u8 (kept 1/2)                                                  1.00     18.9±0.05µs        ? ?/sec    1.00     18.9±0.03µs        ? ?/sec
   filter context u8 high selectivity (kept 1023/1024)                           1.00   1810.0±7.95ns        ? ?/sec    1.01  1833.0±11.09ns        ? ?/sec
   filter context u8 low selectivity (kept 1/1024)                               1.00    246.4±0.38ns        ? ?/sec    1.01    247.7±0.40ns        ? ?/sec
   filter context u8 w NULLs (kept 1/2)                                          1.00     61.7±0.14µs        ? ?/sec    1.46     90.2±0.19µs        ? ?/sec
   filter context u8 w NULLs high selectivity (kept 1023/1024)                   1.06      8.7±0.03µs        ? ?/sec    1.00      8.2±0.02µs        ? ?/sec
   filter context u8 w NULLs low selectivity (kept 1/1024)                       1.00    435.8±0.77ns        ? ?/sec    1.32    574.6±2.20ns        ? ?/sec
   filter decimal128 (kept 1/2)                                                  1.00     94.8±0.46µs        ? ?/sec    1.03     97.5±0.46µs        ? ?/sec
   filter decimal128 high selectivity (kept 1023/1024)                           1.00     52.5±1.12µs        ? ?/sec    1.01     53.3±0.55µs        ? ?/sec
   filter decimal128 low selectivity (kept 1/1024)                               1.21      3.0±0.00µs        ? ?/sec    1.00      2.5±0.00µs        ? ?/sec
   filter f32 (kept 1/2)                                                         1.18    230.5±0.37µs        ? ?/sec    1.00    195.8±0.24µs        ? ?/sec
   filter fsb with value length 20 (kept 1/2)                                    1.00    133.6±0.69µs        ? ?/sec    1.14    151.7±0.79µs        ? ?/sec
   filter fsb with value length 20 high selectivity (kept 1023/1024)             1.02     71.9±3.82µs        ? ?/sec    1.00     70.2±0.55µs        ? ?/sec
   filter fsb with value length 20 low selectivity (kept 1/1024)                 1.24      3.2±0.01µs        ? ?/sec    1.00      2.5±0.01µs        ? ?/sec
   filter fsb with value length 5 (kept 1/2)                                     1.00    131.4±0.23µs        ? ?/sec    1.16    152.8±0.33µs        ? ?/sec
   filter fsb with value length 5 high selectivity (kept 1023/1024)              1.00     11.0±0.90µs        ? ?/sec    1.01     11.2±0.58µs        ? ?/sec
   filter fsb with value length 5 low selectivity (kept 1/1024)                  1.24      3.1±0.00µs        ? ?/sec    1.00      2.5±0.00µs        ? ?/sec
   filter fsb with value length 50 (kept 1/2)                                    1.00    185.5±5.08µs        ? ?/sec    1.03   191.7±13.00µs        ? ?/sec
   filter fsb with value length 50 high selectivity (kept 1023/1024)             1.00    209.5±7.80µs        ? ?/sec    1.04    217.8±7.56µs        ? ?/sec
   filter fsb with value length 50 low selectivity (kept 1/1024)                 1.21      3.1±0.01µs        ? ?/sec    1.00      2.6±0.02µs        ? ?/sec
   filter i32 (kept 1/2)                                                         1.01     92.2±0.12µs        ? ?/sec    1.00     91.5±0.17µs        ? ?/sec
   filter i32 high selectivity (kept 1023/1024)                                  1.00      8.7±0.40µs        ? ?/sec    1.01      8.8±0.38µs        ? ?/sec
   filter i32 low selectivity (kept 1/1024)                                      1.24      3.1±0.01µs        ? ?/sec    1.00      2.5±0.01µs        ? ?/sec
   filter optimize (kept 1/2)                                                    1.03     84.3±0.53µs        ? ?/sec    1.00     82.0±0.32µs        ? ?/sec
   filter optimize high selectivity (kept 1023/1024)                             1.00      2.7±0.01µs        ? ?/sec    1.19      3.2±0.01µs        ? ?/sec
   filter optimize low selectivity (kept 1/1024)                                 1.29      2.8±0.00µs        ? ?/sec    1.00      2.1±0.00µs        ? ?/sec
   filter run array (kept 1/2)                                                   1.00    443.2±0.63µs        ? ?/sec    1.06    469.9±1.05µs        ? ?/sec
   filter run array high selectivity (kept 1023/1024)                            1.00    397.4±2.01µs        ? ?/sec    1.12    445.8±1.54µs        ? ?/sec
   filter run array low selectivity (kept 1/1024)                                1.00    333.3±0.90µs        ? ?/sec    1.00    333.4±1.35µs        ? ?/sec
   filter single record batch                                                    1.02     93.4±0.17µs        ? ?/sec    1.00     92.0±0.46µs        ? ?/sec
   filter u8 (kept 1/2)                                                          1.00     91.9±0.16µs        ? ?/sec    1.04     95.3±0.21µs        ? ?/sec
   filter u8 high selectivity (kept 1023/1024)                                   1.00      3.7±0.01µs        ? ?/sec    1.07      4.0±0.01µs        ? ?/sec
   filter u8 low selectivity (kept 1/1024)                                       1.22      3.0±0.00µs        ? ?/sec    1.00      2.5±0.01µs        ? ?/sec
   ```
   
   
   </p>
   </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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3285762744

   🤖: Benchmark completed
   
   <details><summary>Details</summary>
   <p>
   
   
   ```
   group                                                                                                    alamb_filter_predicate                 main
   -----                                                                                                    ----------------------                 ----
   StringArray: regexp_matches_utf8 scalar benchmarks/regexp_matches_utf8 scalar complex                    1.00      2.9±0.04ms        ? ?/sec    1.03      3.0±0.06ms        ? ?/sec
   StringArray: regexp_matches_utf8 scalar benchmarks/regexp_matches_utf8 scalar contains                   1.00      3.1±0.06ms        ? ?/sec    1.04      3.3±0.09ms        ? ?/sec
   StringArray: regexp_matches_utf8 scalar benchmarks/regexp_matches_utf8 scalar ends with                  1.00      2.6±0.10ms        ? ?/sec    1.09      2.8±0.15ms        ? ?/sec
   StringArray: regexp_matches_utf8 scalar benchmarks/regexp_matches_utf8 scalar starts with                1.00      2.1±0.04ms        ? ?/sec    1.05      2.2±0.11ms        ? ?/sec
   StringViewArray: regexp_matches_utf8view scalar benchmarks/regexp_matches_utf8view scalar complex        1.00      3.0±0.05ms        ? ?/sec    1.05      3.2±0.08ms        ? ?/sec
   StringViewArray: regexp_matches_utf8view scalar benchmarks/regexp_matches_utf8view scalar contains       1.00      3.2±0.05ms        ? ?/sec    1.03      3.3±0.09ms        ? ?/sec
   StringViewArray: regexp_matches_utf8view scalar benchmarks/regexp_matches_utf8view scalar ends with      1.00      2.7±0.08ms        ? ?/sec    1.03      2.7±0.20ms        ? ?/sec
   StringViewArray: regexp_matches_utf8view scalar benchmarks/regexp_matches_utf8view scalar starts with    1.00      2.2±0.07ms        ? ?/sec    1.03      2.3±0.08ms        ? ?/sec
   eq Float32                                                                                               1.00     44.2±0.15µs        ? ?/sec    1.00     44.3±0.33µs        ? ?/sec
   eq Int32                                                                                                 1.00     44.3±0.15µs        ? ?/sec    1.00     44.3±0.12µs        ? ?/sec
   eq MonthDayNano                                                                                          1.00     91.5±3.10µs        ? ?/sec    1.00     91.9±3.30µs        ? ?/sec
   eq StringArray StringArray                                                                               1.04     35.6±0.25ms        ? ?/sec    1.00     34.3±0.37ms        ? ?/sec
   eq StringViewArray StringViewArray                                                                       1.02     25.7±0.19ms        ? ?/sec    1.00     25.3±0.27ms        ? ?/sec
   eq StringViewArray StringViewArray inlined bytes                                                         1.02     23.3±0.33ms        ? ?/sec    1.00     22.9±0.25ms        ? ?/sec
   eq dictionary[10] string[4])                                                                             1.00    863.7±1.50µs        ? ?/sec    1.05    905.7±1.59µs        ? ?/sec
   eq long same prefix strings StringArray                                                                  1.00    608.7±2.97µs        ? ?/sec    1.00    609.7±6.17µs        ? ?/sec
   eq long same prefix strings StringViewArray                                                              1.02    900.7±7.10µs        ? ?/sec    1.00    885.6±6.99µs        ? ?/sec
   eq scalar Float32                                                                                        1.00     44.2±0.14µs        ? ?/sec    1.00     44.2±0.06µs        ? ?/sec
   eq scalar Int32                                                                                          1.00     44.2±0.08µs        ? ?/sec    1.00     44.2±0.08µs        ? ?/sec
   eq scalar MonthDayNano                                                                                   1.01     48.3±0.82µs        ? ?/sec    1.00     47.8±0.53µs        ? ?/sec
   eq scalar StringArray                                                                                    1.07     26.0±0.22ms        ? ?/sec    1.00     24.4±0.53ms        ? ?/sec
   eq scalar StringViewArray 13 bytes                                                                       1.03     17.8±0.15ms        ? ?/sec    1.00     17.2±0.19ms        ? ?/sec
   eq scalar StringViewArray 4 bytes                                                                        1.03     18.0±0.17ms        ? ?/sec    1.00     17.4±0.17ms        ? ?/sec
   eq scalar StringViewArray 6 bytes                                                                        1.03     17.8±0.14ms        ? ?/sec    1.00     17.3±0.18ms        ? ?/sec
   eq_dyn_utf8_scalar dictionary[10] string[4])                                                             1.00     77.1±0.12µs        ? ?/sec    1.00     77.2±0.13µs        ? ?/sec
   gt Float32                                                                                               1.00     57.4±0.18µs        ? ?/sec    1.00     57.5±0.18µs        ? ?/sec
   gt Int32                                                                                                 1.00     44.3±0.14µs        ? ?/sec    1.00     44.2±0.10µs        ? ?/sec
   gt scalar Float32                                                                                        1.00     45.9±0.10µs        ? ?/sec    1.00     45.8±0.10µs        ? ?/sec
   gt scalar Int32                                                                                          1.00     44.3±0.15µs        ? ?/sec    1.00     44.3±0.13µs        ? ?/sec
   gt_eq Float32                                                                                            1.00     57.3±0.25µs        ? ?/sec    1.00     57.2±0.12µs        ? ?/sec
   gt_eq Int32                                                                                              1.00     44.3±0.28µs        ? ?/sec    1.00     44.4±0.25µs        ? ?/sec
   gt_eq scalar Float32                                                                                     1.00     46.5±0.05µs        ? ?/sec    1.00     46.5±0.07µs        ? ?/sec
   gt_eq scalar Int32                                                                                       1.00     44.3±0.16µs        ? ?/sec    1.00     44.3±0.18µs        ? ?/sec
   gt_eq_dyn_utf8_scalar scalar dictionary[10] string[4])                                                   1.00     77.2±0.12µs        ? ?/sec    1.00     77.3±0.16µs        ? ?/sec
   ilike_utf8 scalar complex                                                                                1.00      3.6±0.12ms        ? ?/sec    1.05      3.8±0.21ms        ? ?/sec
   ilike_utf8 scalar contains                                                                               1.00      4.3±0.07ms        ? ?/sec    1.03      4.4±0.14ms        ? ?/sec
   ilike_utf8 scalar ends with                                                                              1.00  1112.8±56.35µs        ? ?/sec    1.03  1145.2±44.45µs        ? ?/sec
   ilike_utf8 scalar equals                                                                                 1.00   684.6±34.55µs        ? ?/sec    1.03   705.6±37.62µs        ? ?/sec
   ilike_utf8 scalar starts with                                                                            1.00  1046.5±55.96µs        ? ?/sec    1.02  1065.8±65.46µs        ? ?/sec
   ilike_utf8_scalar_dyn dictionary[10] string[4])                                                          1.00     77.6±0.11µs        ? ?/sec    1.00     77.7±0.15µs        ? ?/sec
   like_utf8 scalar complex                                                                                 1.04      3.0±0.26ms        ? ?/sec    1.00      2.9±0.13ms        ? ?/sec
   like_utf8 scalar contains                                                                                1.06  1889.8±60.05µs        ? ?/sec    1.00  1787.8±36.84µs        ? ?/sec
   like_utf8 scalar ends with                                                                               1.02    404.5±9.82µs        ? ?/sec    1.00    396.6±8.41µs        ? ?/sec
   like_utf8 scalar equals                                                                                  1.00    110.1±0.64µs        ? ?/sec    1.00    110.0±0.14µs        ? ?/sec
   like_utf8 scalar starts with                                                                             1.00    342.0±7.55µs        ? ?/sec    1.00    341.3±4.05µs        ? ?/sec
   like_utf8_scalar_dyn dictionary[10] string[4])                                                           1.00     77.5±0.12µs        ? ?/sec    1.00     77.6±0.21µs        ? ?/sec
   like_utf8view scalar complex                                                                             1.01    219.7±1.92ms        ? ?/sec    1.00    217.2±4.31ms        ? ?/sec
   like_utf8view scalar contains                                                                            1.00    155.2±0.29ms        ? ?/sec    1.00    155.3±0.23ms        ? ?/sec
   like_utf8view scalar ends with 13 bytes                                                                  1.01     52.2±0.27ms        ? ?/sec    1.00     51.9±0.38ms        ? ?/sec
   like_utf8view scalar ends with 4 bytes                                                                   1.01     53.5±0.19ms        ? ?/sec    1.00     53.2±0.24ms        ? ?/sec
   like_utf8view scalar ends with 6 bytes                                                                   1.00     52.9±0.16ms        ? ?/sec    1.00     52.9±0.26ms        ? ?/sec
   like_utf8view scalar equals                                                                              1.00     35.3±0.11ms        ? ?/sec    1.00     35.2±0.11ms        ? ?/sec
   like_utf8view scalar starts with 13 bytes                                                                1.01     47.2±0.28ms        ? ?/sec    1.00     46.9±0.35ms        ? ?/sec
   like_utf8view scalar starts with 4 bytes                                                                 1.00     29.7±0.12ms        ? ?/sec    1.00     29.6±0.14ms        ? ?/sec
   like_utf8view scalar starts with 6 bytes                                                                 1.01     48.0±0.20ms        ? ?/sec    1.00     47.6±0.21ms        ? ?/sec
   long same prefix strings like_utf8 scalar complex                                                        1.01   1682.3±8.65µs        ? ?/sec    1.00  1672.3±15.08µs        ? ?/sec
   long same prefix strings like_utf8 scalar contains                                                       1.01      4.3±0.02ms        ? ?/sec    1.00      4.2±0.01ms        ? ?/sec
   long same prefix strings like_utf8 scalar ends with                                                      1.00   1884.4±6.46µs        ? ?/sec    1.00   1875.7±5.87µs        ? ?/sec
   long same prefix strings like_utf8 scalar equals                                                         1.01    596.1±2.79µs        ? ?/sec    1.00    591.3±4.98µs        ? ?/sec
   long same prefix strings like_utf8 scalar starts with                                                    1.00      2.0±0.00ms        ? ?/sec    1.02      2.1±0.01ms        ? ?/sec
   long same prefix strings like_utf8view scalar complex                                                    1.00   1711.6±7.34µs        ? ?/sec    1.00  1710.8±10.04µs        ? ?/sec
   long same prefix strings like_utf8view scalar contains                                                   1.09      4.7±0.02ms        ? ?/sec    1.00      4.3±0.02ms        ? ?/sec
   long same prefix strings like_utf8view scalar ends with                                                  1.02   1946.8±6.11µs        ? ?/sec    1.00  1915.7±10.74µs        ? ?/sec
   long same prefix strings like_utf8view scalar equals                                                     1.00    616.7±2.56µs        ? ?/sec    1.02   629.6±10.93µs        ? ?/sec
   long same prefix strings like_utf8view scalar starts with                                                1.00      2.1±0.01ms        ? ?/sec    1.00      2.1±0.03ms        ? ?/sec
   lt Float32                                                                                               1.00     57.2±0.16µs        ? ?/sec    1.00     57.3±0.12µs        ? ?/sec
   lt Int32                                                                                                 1.00     44.3±0.12µs        ? ?/sec    1.00     44.2±0.11µs        ? ?/sec
   lt StringViewArray StringViewArray inlined bytes                                                         1.01     28.5±0.15ms        ? ?/sec    1.00     28.2±0.13ms        ? ?/sec
   lt long same prefix strings StringArray                                                                  1.00    640.1±3.17µs        ? ?/sec    1.00    638.7±5.13µs        ? ?/sec
   lt long same prefix strings StringViewArray                                                              1.01    855.4±9.37µs        ? ?/sec    1.00    846.2±5.27µs        ? ?/sec
   lt scalar Float32                                                                                        1.00     46.5±0.07µs        ? ?/sec    1.00     46.5±0.05µs        ? ?/sec
   lt scalar Int32                                                                                          1.00     44.2±0.10µs        ? ?/sec    1.00     44.2±0.07µs        ? ?/sec
   lt scalar StringArray                                                                                    1.02     47.1±0.30ms        ? ?/sec    1.00     46.0±0.39ms        ? ?/sec
   lt scalar StringViewArray                                                                                1.01     49.5±0.10ms        ? ?/sec    1.00     48.9±0.15ms        ? ?/sec
   lt_eq Float32                                                                                            1.00     57.5±0.15µs        ? ?/sec    1.00     57.6±0.26µs        ? ?/sec
   lt_eq Int32                                                                                              1.00     44.3±0.23µs        ? ?/sec    1.00     44.3±0.12µs        ? ?/sec
   lt_eq scalar Float32                                                                                     1.00     45.9±0.21µs        ? ?/sec    1.00     45.9±0.06µs        ? ?/sec
   lt_eq scalar Int32                                                                                       1.00     44.3±0.10µs        ? ?/sec    1.00     44.3±0.22µs        ? ?/sec
   neq Float32                                                                                              1.00     44.3±0.12µs        ? ?/sec    1.00     44.3±0.21µs        ? ?/sec
   neq Int32                                                                                                1.00     44.3±0.11µs        ? ?/sec    1.00     44.3±0.20µs        ? ?/sec
   neq long same prefix strings StringArray                                                                 1.01    610.4±5.22µs        ? ?/sec    1.00    604.9±2.80µs        ? ?/sec
   neq long same prefix strings StringViewArray                                                             1.01    897.4±9.43µs        ? ?/sec    1.00    888.0±5.12µs        ? ?/sec
   neq scalar Float32                                                                                       1.00     44.2±0.05µs        ? ?/sec    1.00     44.2±0.08µs        ? ?/sec
   neq scalar Int32                                                                                         1.00     44.3±0.12µs        ? ?/sec    1.00     44.2±0.09µs        ? ?/sec
   nilike_utf8 scalar complex                                                                               1.00      3.6±0.10ms        ? ?/sec    1.07      3.8±0.20ms        ? ?/sec
   nilike_utf8 scalar contains                                                                              1.00      4.4±0.12ms        ? ?/sec    1.02      4.5±0.13ms        ? ?/sec
   nilike_utf8 scalar ends with                                                                             1.00  1102.9±40.08µs        ? ?/sec    1.02  1129.6±64.67µs        ? ?/sec
   nilike_utf8 scalar equals                                                                                1.00   706.9±33.32µs        ? ?/sec    1.04   737.4±51.60µs        ? ?/sec
   nilike_utf8 scalar starts with                                                                           1.02  1081.4±45.53µs        ? ?/sec    1.00  1063.7±34.79µs        ? ?/sec
   nlike_utf8 scalar complex                                                                                1.00      2.8±0.08ms        ? ?/sec    1.07      3.0±0.23ms        ? ?/sec
   nlike_utf8 scalar contains                                                                               1.01  1840.7±45.70µs        ? ?/sec    1.00  1815.0±41.39µs        ? ?/sec
   nlike_utf8 scalar ends with                                                                              1.06   421.2±15.52µs        ? ?/sec    1.00    397.7±6.35µs        ? ?/sec
   nlike_utf8 scalar equals                                                                                 1.00    110.0±1.41µs        ? ?/sec    1.00    109.8±0.16µs        ? ?/sec
   nlike_utf8 scalar starts with                                                                            1.05   373.7±14.37µs        ? ?/sec    1.00   356.5±19.33µs        ? ?/sec
   ```
   
   
   </p>
   </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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#discussion_r2166457968


##########
arrow-select/src/filter.rs:
##########
@@ -180,25 +180,15 @@ pub fn prep_null_mask_filter(filter: &BooleanArray) -> BooleanArray {
 pub fn filter(values: &dyn Array, predicate: &BooleanArray) -> Result<ArrayRef, ArrowError> {
     let mut filter_builder = FilterBuilder::new(predicate);
 
-    if multiple_arrays(values.data_type()) {
+    if FilterBuilder::multiple_arrays(values.data_type()) {

Review Comment:
   The diff makes this PR look like a much larger change than it really is -- I found using whitespace blind diff was easier to see the changes: https://github.com/apache/arrow-rs/pull/7771/files?w=1



-- 
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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3004555519

   🤖 `./gh_compare_arrow.sh` [Benchmark Script](https://github.com/alamb/datafusion-benchmarking/blob/main/gh_compare_arrow.sh) Running
   Linux aal-dev 6.11.0-1015-gcp #15~24.04.1-Ubuntu SMP Thu Apr 24 20:41:05 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
   Comparing alamb/filter_predicate (0b70ea68f132d2dcf8705ad495f5d4da2d9a0495) to b6240b32e235d4ca330372e3be31f784ba133252 [diff](https://github.com/apache/arrow-rs/compare/b6240b32e235d4ca330372e3be31f784ba133252..0b70ea68f132d2dcf8705ad495f5d4da2d9a0495)
   BENCH_NAME=filter_kernels
   BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental --bench filter_kernels 
   BENCH_FILTER=
   BENCH_BRANCH_NAME=alamb_filter_predicate
   Results will be posted here when complete
   


-- 
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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3004386228

   🤖 `./gh_compare_arrow.sh` [Benchmark Script](https://github.com/alamb/datafusion-benchmarking/blob/main/gh_compare_arrow.sh) Running
   Linux aal-dev 6.11.0-1015-gcp #15~24.04.1-Ubuntu SMP Thu Apr 24 20:41:05 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
   Comparing alamb/filter_predicate (0b70ea68f132d2dcf8705ad495f5d4da2d9a0495) to b6240b32e235d4ca330372e3be31f784ba133252 [diff](https://github.com/apache/arrow-rs/compare/b6240b32e235d4ca330372e3be31f784ba133252..0b70ea68f132d2dcf8705ad495f5d4da2d9a0495)
   BENCH_NAME=filter_kernels
   BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental --bench filter_kernels 
   BENCH_FILTER=
   BENCH_BRANCH_NAME=alamb_filter_predicate
   Results will be posted here when complete
   


-- 
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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3004798734

   My conclusion from the benchmark numbers is that this PR doesn't change performance, but there seems to be a lot of noise 


-- 
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@arrow.apache.org

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


Re: [PR] Refactor filter functions as methods on `FilterPredicate` struct [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7771:
URL: https://github.com/apache/arrow-rs/pull/7771#issuecomment-3285551093

   🤖 `./gh_compare_arrow.sh` [Benchmark Script](https://github.com/alamb/datafusion-benchmarking/blob/main/scripts/gh_compare_arrow.sh) Running
   Linux aal-dev 6.14.0-1014-gcp #15~24.04.1-Ubuntu SMP Fri Jul 25 23:26:08 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
   Comparing alamb/filter_predicate (08e9269b30211749a3d8247866e1f951caecebff) to aa626e12de8bc0d0f56b5349239cae1be8d1a195 [diff](https://github.com/apache/arrow-rs/compare/aa626e12de8bc0d0f56b5349239cae1be8d1a195..08e9269b30211749a3d8247866e1f951caecebff)
   BENCH_NAME=filter_kernels
   BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental --bench filter_kernels 
   BENCH_FILTER=
   BENCH_BRANCH_NAME=alamb_filter_predicate
   Results will be posted here when complete
   


-- 
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@arrow.apache.org

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