zhuqi-lucas commented on code in PR #16369:
URL: https://github.com/apache/datafusion/pull/16369#discussion_r2142611695


##########
datafusion/physical-optimizer/src/insert_yield_exec.rs:
##########
@@ -15,10 +15,12 @@
 // specific language governing permissions and limitations
 // under the License.
 
-//! The `InsertYieldExec` optimizer rule inspects the physical plan to look for
-//! tight-looping operators and inserts explicit yielding mechanisms (whether
-//! as a separate operator, or via a yielding variant) at leaf nodes to make
-//! the plan cancellation friendly.
+//! The `InsertYieldExec` optimizer rule inspects the physical plan to find 
all leaf

Review Comment:
   Thank you @alamb for good suggestion!



##########
datafusion/physical-optimizer/src/insert_yield_exec.rs:
##########
@@ -32,9 +34,10 @@ use datafusion_physical_plan::yield_stream::YieldStreamExec;
 use datafusion_physical_plan::ExecutionPlan;
 
 /// `InsertYieldExec` is a [`PhysicalOptimizerRule`] that finds every leaf 
node in
-/// the plan, and replaces it with a variant that cooperatively yields
-/// either using the its yielding variant given by `with_cooperative_yields`,
-/// or, if none exists, by inserting a [`YieldStreamExec`] operator as a 
parent.
+/// the plan and replaces it with a variant that yields cooperatively if 
supported.
+/// If the node does not provide a built-in yielding variant via
+/// `with_cooperative_yields`, it is wrapped in a [`YieldStreamExec`] parent to

Review Comment:
   Thank you @alamb for good suggestion!



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