jackwener commented on code in PR #4233: URL: https://github.com/apache/arrow-datafusion/pull/4233#discussion_r1028048962
########## 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: Indeed, we may need to relax restrictions on some conditions, such as `nullable`. In this way we can get more room for optimization. But in most cases, we don't need to do this, we can wait until we need to do this -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org