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

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   - Closes #20181 
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.  
   -->
   Issue #20152 identifies potential areas for optimization for `RunArray` and 
`StructArray` hashing. But the existing `with_hashes` benchmark tests don't 
include coverage for these types.
   
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   Added benchmarks to `with_hashes.rs`:
     - **StructArray**: 4-column struct (bool, int32, int64, string)
     - **RunArray**: Int32 run-encoded array
     - Both include single/multiple columns and with/without nulls
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   No additional tests added, but the benchmarks both compile and run. 
   
   <details>
   <summary>a sample run:</summary>
   
   ```
   ❯ cargo bench --features=parquet --bench with_hashes -- array
      Compiling datafusion-common v52.1.0 
(/Users/notashes/dev/datafusion/datafusion/common)
       Finished `bench` profile [optimized] target(s) in 34.49s
        Running benches/with_hashes.rs 
(target/release/deps/with_hashes-2f180744d22084f3)
   Gnuplot not found, using plotters backend
   struct_array: single, no nulls
                           time:   [38.389 µs 38.437 µs 38.485 µs]
   Found 5 outliers among 100 measurements (5.00%)
     1 (1.00%) low severe
     2 (2.00%) low mild
     2 (2.00%) high mild
   
   struct_array: single, nulls
                           time:   [46.108 µs 46.197 µs 46.291 µs]
   Found 4 outliers among 100 measurements (4.00%)
     3 (3.00%) high mild
     1 (1.00%) high severe
   
   struct_array: multiple, no nulls
                           time:   [114.64 µs 114.79 µs 114.93 µs]
   Found 4 outliers among 100 measurements (4.00%)
     1 (1.00%) low severe
     2 (2.00%) low mild
     1 (1.00%) high mild
   
   struct_array: multiple, nulls
                           time:   [138.29 µs 138.62 µs 139.07 µs]
   Found 8 outliers among 100 measurements (8.00%)
     1 (1.00%) low severe
     4 (4.00%) low mild
     1 (1.00%) high mild
     2 (2.00%) high severe
   
   run_array_int32: single, no nulls
                           time:   [1.8777 µs 1.9098 µs 1.9457 µs]
   Found 3 outliers among 100 measurements (3.00%)
     3 (3.00%) high mild
   
   run_array_int32: single, nulls
                           time:   [2.0110 µs 2.0417 µs 2.0751 µs]
   Found 7 outliers among 100 measurements (7.00%)
     6 (6.00%) high mild
     1 (1.00%) high severe
   
   run_array_int32: multiple, no nulls
                           time:   [5.0511 µs 5.0603 µs 5.0693 µs]
   Found 6 outliers among 100 measurements (6.00%)
     1 (1.00%) low mild
     5 (5.00%) high mild
   
   run_array_int32: multiple, nulls
                           time:   [5.6052 µs 5.6201 µs 5.6353 µs]
   Found 4 outliers among 100 measurements (4.00%)
     3 (3.00%) high mild
     1 (1.00%) high severe
     ```
   
   
   </details>
   
   ## Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to