mingmwang commented on code in PR #4233:
URL: https://github.com/apache/arrow-datafusion/pull/4233#discussion_r1027815180


##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -225,6 +225,14 @@ impl Optimizer {
                 let result = rule.try_optimize(&new_plan, optimizer_config);
                 match result {
                     Ok(Some(plan)) => {
+                        if plan.schema() != new_plan.schema() {
+                            return Err(DataFusionError::Internal(format!(

Review Comment:
   @jackwener 
   Is it possible that the check can not always pass in case that some of the 
optimization rules might change the nullability of the Schema ? 
   For example and Column Expression was replaced by a Literal Constant due to 
Constant propagation ?



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