houqp commented on a change in pull request #1183:
URL: https://github.com/apache/arrow-datafusion/pull/1183#discussion_r738005498



##########
File path: datafusion/src/execution/dataframe_impl.rs
##########
@@ -56,8 +56,12 @@ impl DataFrameImpl {
     /// Create a physical plan
     async fn create_physical_plan(&self) -> Result<Arc<dyn ExecutionPlan>> {
         let state = self.ctx_state.lock().unwrap().clone();
+        let has_optimized = state.has_optimized;

Review comment:
       @xudong963 I think what @alamb meant was the return value from 
`ctx.optimize(&self.plan)?` was not saved into `self.plan`. So the next time 
`create_physical_plan` is called, `ctx.create_physical_plan(&plan).await` will 
be invoked with an unoptimized plan.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to