alamb commented on code in PR #22903:
URL: https://github.com/apache/datafusion/pull/22903#discussion_r3453193844


##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -518,10 +518,23 @@ fn rewrite_plan_in_place(
         }
     }
 
-    // Recurse into children using Arc::make_mut (zero-cost when refcount == 1)
-    changed |= map_children_mut(plan, |child| {
-        rewrite_plan_in_place(child, apply_order, rule, config)
+    let mut child_schema_changed = false;

Review Comment:
   This seems like it is potentially treating a symptom rather than the root 
cause 🤔 
   
   I worry this change may be ignoring the root cause elsewhere (an incorrectly 
reported "transofrmed" flag)
   
   It seems like if the plan returns `transformed = false` the schema should 
not have changed. 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to