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

   ## Which issue does this PR close?
   
   - Contributes toward #7001.
   
   ## Rationale for this change
   
   When range repartition input already satisfies the range ordering, each 
output partition receives a contiguous run of rows. After #27707, those rows 
still go through the indexed coalescer. Dense contiguous runs can instead be 
passed to the regular coalescer as zero-copy `RecordBatch` slices.
   
   ## What changes are included in this PR?
   
   This is stacked on #27707 at `c7b496b8742f298955d3bcaa00dc9dc48832702e`.
   
   Bounded, non-order-preserving range repartition uses slices only when the 
input declares the required ordering, the routed indices are contiguous, and 
the input averages at least 64 rows per configured output partition. Small or 
non-contiguous selections, unbounded input, preserve-order mode, hash 
repartition, and public `BatchPartitioner` callers retain the 
indexed/materialized paths.
   
   ## What is the testing strategy for this PR?
   
   Unit coverage exercises the slice path and its contiguity, density, and 
disabled fallbacks. The repartition suite and full all-target/all-feature 
Clippy pass.
   
   ## benchmark results for this PR?
   
   Controlled release-mode routing plus coalescing benchmark against the #27707 
indexed path, using 8,192-row batches and median timings from seven alternating 
samples:
   
   | Partitions | Ordered range | Path |
   | ---: | ---: | --- |
   | 8 | -11.13% | slices |
   | 16 | -6.74% | slices |
   | 32 | -9.01% | slices |
   | 64 | -3.41% | slices |
   | 128 | -2.63% | slices |
   | 256 | baseline | indexed fallback |
   | 512 | baseline | indexed fallback |
   
   The existing `range_repartition` Criterion target measures public 
`BatchPartitioner`, which this PR intentionally leaves unchanged, so it does 
not cover this internal path.
   
   ## Are there any user-facing changes?
   
   No.
   


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