Rich-T-kid opened a new pull request, #25128:
URL: https://github.com/apache/datafusion/pull/25128

   ## 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 #25127.
   
   ## Rationale for this change
   RepartitionExec is one of the most frequently executed operators in 
DataFusion, every parallel query goes through it, but there were no dedicated 
benchmarks for it. 
   also see #25127
   
   <!--
    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.  
   
   Please explain the problem you are trying to solve in terms of the 
user-visible
   behavior, rather than the implementation.
   
   For example, "The code in `foo.rs` doesn't handle nulls" is a symptom of the
   implementation. "COUNT(DISTINCT) returns wrong results when the column 
contains
   nulls" is the user-visible problem.
   -->
   
   ## What changes are included in this PR?
   
   Adds `datafusion/physical-plan/benches/repartition.rs` with two categories 
of benchmarks:
   
   BatchPartitioner microbenchmarks (no async, pure CPU routing cost):
   - `hash_partitioner/partition_count` — sweeps power-of-two and 
non-power-of-two counts (8, 10, 16, 32, 64, 100, 128), exercising both branches 
of StrengthReducedU64 (bitmask vs. reciprocal multiply)
   - `hash_partitioner/key_type` — compares Int32, Int64, and Utf8View hashing 
cost at 32 partitions
   - `hash_partitioner/key_count` — 1, 2, and 3 composite key columns at 32 
partitions, showing per-key overhead
   - `round_robin_partitioner/partition_count` — trivial routing baseline for 
isolating channel overhead from hash cost
   
   End-to-end RepartitionExec benchmarks (full async path, 5M rows):
   - `repartition_exec/hash_1_to_n` — 1 input → N outputs (4, 8, 16, 32) with 
hash partitioning
   - `repartition_exec/round_robin_1_to_n` — same topology with round-robin, 
for direct comparison against hash
   - `repartition_exec/hash_n_to_n` — N inputs → N outputs (4, 8, 16), the 
typical concurrent-producer scenario
   - `repartition_exec/hash_m_to_n` — asymmetric topologies: consolidation 
(16→4, 16→8, 32→8) and fan-out (4→16, 8→16, 8→32)
   
   <!--
   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.
   -->
   
   ## What is the testing strategy for this PR?
   n/a
   <!--
   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
   
   Briefly describe how this PR is tested, and point to the specific tests you 
added. For example: 'This new feature is covered by the `sqllogictest` cases 
added in `foo.slt`'.
   
   If this PR does not add tests, explain why. For example, if the change is 
already covered by existing tests, please mention it.
   
   You should also check the `codecov` bot reply on this PR to confirm the 
changed code is exercised.
   -->
   
   ## Are there any user-facing changes?
   no
   <!--
   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