dqkqd commented on code in PR #18740:
URL: https://github.com/apache/datafusion/pull/18740#discussion_r2535351745


##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1472,13 +1472,24 @@ impl LogicalPlan {
                     Ok(transformed_expr.update_data(|expr| 
original_name.restore(expr)))
                 }
             })?
-            // always recompute the schema to ensure the changed in the 
schema's field should be
-            // poplulated to the plan's parent
-            .map_data(|plan| plan.recompute_schema())
+            .map_data(|plan| plan.update_schema_data_type())
         })
         .map(|res| res.data)
     }
 
+    /// Recompute schema fields' data type after replacing params, ensuring 
fields data type can be
+    /// updated according to the new parameters.

Review Comment:
   I updated the docstring, but I want to keep the comment to make it clear why 
`recompute_schema` shouldn't be called for `LogicalPlan::Values`.
   



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