jonahgao commented on PR #10234: URL: https://github.com/apache/datafusion/pull/10234#issuecomment-2087760241
> The only type of query that this PR seems to solve involves the HAVING clause -- maybe the issue is that the schema used to to resolve the HAVING clause needs to be treated like the ORDER BY clause? @alamb I think we should make the column qualified, not the other way around. The problem of the `SUM()` example is that it can't resolve the qualifier of `a` in `ORDER BY SUM(a)`, to match the select list item which has been normalized into `SUM(t.a)`. I think that we should handle `ORDER BY` similarly to `HAVING`, use the merged schema, add the missing columns directly in the select list, instead of traversing the plan looking for projection node. Their processing logic may be reusable. -- 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