Rich-T-kid opened a new pull request, #11174: URL: https://github.com/apache/arrow-rs/pull/11174
# 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. --> - Closes #11141 & #8957 # Rationale for this change Callers that need to interleave rows from multiple source batches (top-K emission, hash join materialisation, sort-merge join) currently must: 1. Call interleave_record_batch → allocates an intermediate RecordBatch 2. Call push_batch on the result → copies again into the coalescer 3. Drop the intermediate batch push_batch_interleaved collapses both steps into one call, (possibly) removing the intermediate allocation. <!-- 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. --> # What changes are included in this PR? This PR exists only to establish the API. The implementation is intentionally equivalent to calling interleave_record_batch + push_batch. A follow-up PR, guided by the benchmarks also introduced here, will optimize the path by avoiding the intermediate RecordBatch allocation. Benchmarks Added interleave group to coalesce_kernels covering the same null_density × selectivity matrix as the existing filter/take groups, across: - primitive (int32 / float64 / timestamp) — specialized path - single_utf8view at two string lengths — exercises inline vs buffer split - mixed_fsb (16+32) — FixedSizeBinary specialized path - mixed_generic (binary/bool/dict) — generic path <!-- 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. --> # Are these changes tested? yes test are included. <!-- 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)? If this PR claims a performance improvement, please include evidence such as benchmark results. --> # Are there any user-facing changes? new public API method on `BatchCoalescer` <!-- 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 call them out. --> -- 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]
