ozankabak commented on PR #16196:
URL: https://github.com/apache/datafusion/pull/16196#issuecomment-2943327837

   Hmm, I wonder if we design the `yields_cooperatively` API to return the 
following `enum`:
   ```rust
   pub enum InputPipelineBehavior {
      Source(bool),
      Intermediate(Vec<bool>),
   }
   ```
   where the operator returns:
   - `Source(false)` when it is a source and doesn't cooperate,
   - `Source(true)` when it is a source and cooperates,
   - `Intermediate(Vec<bool>)` when it is an intermediate node with children. 
Each boolean in the vector indicates whether the operator cooperates while it 
consumes that child.
   
   The default implementation would return `Source(false)` for leaf nodes, and 
`Intermediate(vec![self.pipeline_behavior() != EmissionType::Final, 
self.children().len())` for non-leaf nodes. Plans like joins can override this 
depending on whether they are in `CollectLeft` mode etc.
   
   Thoughts?


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