You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2026/01/21 18:28:43 UTC
[PR] feat: Coalesce small batches before shuffle write for improved efficiency [datafusion-comet]
andygrove opened a new pull request, #3234:
URL: https://github.com/apache/datafusion-comet/pull/3234
## Summary
This PR adds batch coalescing before shuffle writes to reduce per-batch overhead and improve vectorization efficiency. When enabled, small columnar batches are combined until they reach the target batch size before being processed by the shuffle writer.
**Key changes:**
- Added `spark.comet.shuffle.resizeBatches.input` config to enable coalescing batches before shuffle write
- Added `spark.comet.shuffle.resizeBatches.output` config for coalescing after shuffle read
- Native planner wraps shuffle input with DataFusion's `CoalesceBatchesExec` when input coalescing is enabled
- Added `CometBatchCoalescer` Scala class for output-side batch coalescing
**Performance benefits observed in TPC-H Q18 benchmarks:**
- 10.9% overall query time improvement
- Significantly reduced GC pressure (e.g., Stage 26: GC time dropped from 3,602ms to 56ms)
- Better vectorization efficiency for downstream operators
## Test plan
- [ ] Verify existing unit tests pass
- [ ] Run TPC-H Q18 benchmark with `spark.comet.shuffle.resizeBatches.input=true`
- [ ] Verify GC metrics improve with the optimization enabled
- [ ] Test with various batch sizes to ensure correct behavior
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] feat: Coalesce small batches before shuffle write [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove closed pull request #3234: feat: Coalesce small batches before shuffle write
URL: https://github.com/apache/datafusion-comet/pull/3234
--
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@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org