You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Idea: Avoid planning CoalesceBatches in front of blocking operators. #15478
The blocking operators (HJ buid side, Aggregation) are often planned on top of a RepartitionExec with a CoalesceBatchesExec in-between. However, one of the first things these operators do is concatenate the freshly coalesced batches - Maybe there is no benefit from adding the coalesce's here?
The hash join build side stores the RecordBatches in a vector before building the hash table. This vector will grow larger. In addition, we might delay e.g. garbage collection for StringViews, which also increases memory usage.
The hash join build side stores the RecordBatches in a vector before building the hash table. This vector will grow larger. In addition, we might delay e.g. garbage collection for StringViews, which also increases memory usage.
Perhaps instead of removing the coalescebatches, we can change the the threshold ratio to be much smaller (e.g. 1/10th (or something based on some benchmarkig) of the size instead of 1/2). That way the overhead of Vec is minimal while probably still redundant copying in many cases.
Activity
ctsk commentedon Mar 28, 2025
One downside: Increased memory usage.
The hash join build side stores the RecordBatches in a vector before building the hash table. This vector will grow larger. In addition, we might delay e.g. garbage collection for StringViews, which also increases memory usage.
Dandandan commentedon Mar 29, 2025
Perhaps instead of removing the coalescebatches, we can change the the threshold ratio to be much smaller (e.g. 1/10th (or something based on some benchmarkig) of the size instead of 1/2). That way the overhead of
Vecis minimal while probably still redundant copying in many cases.alamb commentedon Jan 6, 2026
We have now removed the operator entirely via
CoalesceBatchesoptimizer rule #19591And we have incorporated the coalescing in the relevant operators)
So I think this issue is now complete