stuhood commented on issue #25483:
URL: https://github.com/apache/datafusion/issues/25483#issuecomment-5735243909

   @gene-bordegaray: Nice! It seems like this potentially unifies 
`CoalescePartitionsExec` and `RepartitionExec`, which is awesome?:
   1. `CoalescePartitionsExec` is just an `N -> 1` mapping with whole-batch 
forwarding.
   2. It gives us `N -> M` coalescing (`1 < M < N`), which we don't have now 
(today, reducing partition count forces an all-to-all hash or round-robin 
repartition).
   
   For `SourceFiner`, do you envision executing this via `RepartitionExec` 
(spawning background tasks with channels), or via direct in-thread stream 
concatenation (like a generalized `CoalescePartitionsExec`)?
   
   If adjacent partitions `S0: (-inf, 10)` and `S1: [10, 20)` are internally 
sorted, streaming `S0` then `S1` sequentially in-thread preserves total sort 
order for free without channels, background tasks, or heaps. Routing through 
`RepartitionExec` channels would interleave them across threads and lose 
ordering.
   
   ----
   
   We ran into this exact distinction between shuffle (`NetworkShuffleExec`) 
and disjoint task coalescing (`NetworkCoalesceExec`) in DFD: see 
https://github.com/paradedb/datafusion-distributed/issues/68.
   


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