gabotechs commented on code in PR #16093: URL: https://github.com/apache/datafusion/pull/16093#discussion_r2096086285
########## datafusion/physical-plan/src/repartition/mod.rs: ########## @@ -406,8 +462,12 @@ impl BatchPartitioner { pub struct RepartitionExec { /// Input execution plan input: Arc<dyn ExecutionPlan>, - /// Inner state that is initialized when the first output stream is created. - state: LazyState, + /// Inner state that is initialized when the parent calls .execute() on this node + /// and consumed as soon as the parent starts consuming this node. + state: Arc<Mutex<RepartitionExecState>>, + /// Stores whether the state has been initialized. Checking this AtomicBool is faster than Review Comment: yes, exactly that, I'll clarify in the comment -- 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