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


##########
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:
   @alamb,
   
   > I worry this change may be ignoring the root cause elsewhere (an 
incorrectly reported "transofrmed" flag)
   
   I think validating Transformed accuracy is worthwhile, but probably separate 
from this fix. 
   
   This PR intentionally continues to trust transformed; it recomputes parent 
schemas when a child rewrite reports changed = true and the child schema 
actually differs.



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