You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/21 10:10:51 UTC

[GitHub] [arrow-datafusion] mingmwang commented on a diff in pull request #4233: add a checker to confirm optimizer can keep plan schema immutable.

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org