jonahgao opened a new pull request, #9265:
URL: https://github.com/apache/arrow-datafusion/pull/9265

   ## Which issue does this PR close?
   
   Closes #9161.
   
   ## Rationale for this change
   In issue #9161, the expression `cast(a as int)` in the select list 
[generated](https://github.com/apache/arrow-datafusion/blob/497cb9d46c6f68de6762998c241d0860072c7909/datafusion/expr/src/expr.rs#L1687)
 a unqualified column named 't.a', which was then incorrectly referenced by the 
group by clause, leading to a schema error.
   
   After merging PR #9228, the group by clause will now preferentially 
reference the column of the same name from the **input**, rather than the one 
in the **select list**, thereby resolving the issue.
   
   I suspect there will still be similar issues, but we may need to find a new 
case to verify whether they truly exist.
   
   ## What changes are included in this PR?
   Add a test.
   
   ## Are these changes tested?
   
   Yes
   
   ## Are there any user-facing changes?
   No


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