jonahgao commented on PR #9265: URL: https://github.com/apache/arrow-datafusion/pull/9265#issuecomment-1953403726
> Thanks @jonahgao I still don't get how this PR closes the issue 🤔 Previously, to parse column references in the 'GROUP BY' expression, we would sequentially [search](https://github.com/apache/arrow-datafusion/blob/e58446bbe9ebe3f5a2aae1abd3c17a694070b0d1/datafusion/sql/src/select.rs#L92) for the column names in the output schema of the select list and then in the input plan. However, the cast expression [generated](https://github.com/apache/arrow-datafusion/blob/497cb9d46c6f68de6762998c241d0860072c7909/datafusion/expr/src/expr.rs#L1687) an output column named "t.a", which has the same name as the column reference in the group by, thus resulting in an incorrect match, which should not happen. After PR #9228, we first searched from the input plan and then obtained the correct match, which is the column `a` of table `t`. I think there are still bugs concerning the naming of cast expressions and the planning of 'GROUP BY' clauses. But in this case, they cannot be reproduced. I need to find a new one. -- 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]
