LiaCastaneda commented on code in PR #15438: URL: https://github.com/apache/datafusion/pull/15438#discussion_r2014089960
########## datafusion/physical-expr/src/equivalence/projection.rs: ########## @@ -66,9 +66,9 @@ impl ProjectionMapping { let idx = col.index(); let matching_input_field = input_schema.field(idx); if col.name() != matching_input_field.name() { - return internal_err!("Input field name {} does not match with the projection expression {}", - matching_input_field.name(),col.name()) - } + let fixed_col = Column::new(col.name(), idx); + return Ok(Transformed::yes(Arc::new(fixed_col))) + } Review Comment: If this check is skipped the query will still work, same as it can be skipped [here](https://github.com/DataDog/datafusion/blob/7299d0e566caa1e10f47a74b8ae817b6fb146fdf/datafusion/core/src/physical_planner.rs#L654) for aggregate nodes schema check. Without this we would get the error: Input field name count(Int64(1)) does not match with the projection expression count(Int64(1)):1 I think we can either skip it or adjust the projection schema names as its currently done, instead of erroing out. -- 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...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org