gabotechs commented on code in PR #16093: URL: https://github.com/apache/datafusion/pull/16093#discussion_r2107592672
########## datafusion/physical-plan/src/repartition/mod.rs: ########## @@ -595,30 +651,29 @@ impl ExecutionPlan for RepartitionExec { // Get existing ordering to use for merging let sort_exprs = self.sort_exprs().cloned().unwrap_or_default(); + let state = Arc::clone(&self.state); + if !self.state_initialized.swap(true, Ordering::Relaxed) { + state.lock().ensure_input_streams_initialized( Review Comment: Pushed another small change for further simplifying the setup https://github.com/apache/datafusion/pull/16093/commits/21db4d5b0cb56c026d311b47d3fa4f7b3341f041 Removes the `state_initialized: Arc<AtomicBool>` in favor of optimistically locking the state: If the state is locked, it just moves on without blocking, otherwise, the lock is acquired -- 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