berkaysynnada commented on code in PR #15438:
URL: https://github.com/apache/datafusion/pull/15438#discussion_r2025001167


##########
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:
   I think we should revert this change. This check was helpful in catching 
many errors, especially while developing projection-related code (e.g. 
projection pushdown). Sorry for my delayed response, but @LiaCastaneda, could 
you please address the root cause of the issue and revert this change?
   
   As you mentioned, the problem likely stems from inconsistent naming 
conventions between columns and fields. I recall encountering similar issues 
with aggregation functions in the past, and we resolved them by unifying the 
naming. I believe the correct fix shouldn’t require too much effort.



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

Reply via email to