zhuqi-lucas commented on code in PR #16196: URL: https://github.com/apache/datafusion/pull/16196#discussion_r2128549342
########## datafusion/physical-plan/src/execution_plan.rs: ########## @@ -75,7 +75,19 @@ use futures::stream::{StreamExt, TryStreamExt}; /// [`execute`]: ExecutionPlan::execute /// [`required_input_distribution`]: ExecutionPlan::required_input_distribution /// [`required_input_ordering`]: ExecutionPlan::required_input_ordering -pub trait ExecutionPlan: Debug + DisplayAs + Send + Sync { +/// The core trait for a physical execution plan node. Every operator +/// implements this trait. We have extended it by adding two new methods +/// for “cooperative yielding” support: +/// +/// 1. `yields_cooperatively()` indicates whether this operator already +/// supports async/yield behavior internally (default: false). +/// +/// 2. `with_cooperative_yields(self: Arc<Self>)` returns an alternate +/// plan node that has built-in yielding; if not available, returns None. +/// +/// Because `with_cooperative_yields` moves `Arc<Self>` into `Arc<dyn ExecutionPlan>`, +/// we must ensure `Self: 'static`. Therefore, we add `+ 'static` here. +pub trait ExecutionPlan: Debug + DisplayAs + Send + Sync + 'static { Review Comment: Yeah, i misunderstand the logic here, thanks @ozankabak . -- 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