pepijnve commented on PR #16398:
URL: https://github.com/apache/datafusion/pull/16398#issuecomment-2988212465

   > Got it, so we add Cooperative to some operators such as 
sort_perserve_merging when partition > 1
   
   No, that hasn't changed (or at least it shouldn't have). When SPM has more 
than 1 input, it acts as an exchange and drives the inputs itself. This is 
advertised using `EvaluationType::Eager`.
   It makes use of tokio mpsc channels which are (and were) already consuming 
the tokio task budget. Because of this implementation aspect SPM advertises 
itself as `SchedulingType::Cooperative`.
   The optimizer should not be adding `CooperativeExec` here. I'll double check 
to be sure. The query I was investigating specifically doesn't use SPM though.
   
   Note that each exchange is also a task boundary, so task budget consumption 
does not leak from below the exchange to above it or vice versa. Since all the 
inputs to SPM are all driven as distinct tasks, there also shouldn't be any 
competition amongst the inputs.


-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to