You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/12/08 10:49:04 UTC

[GitHub] [arrow-datafusion] mingmwang commented on issue #4556: `having` shouldn't include alias in projection

mingmwang commented on issue #4556:
URL: https://github.com/apache/arrow-datafusion/issues/4556#issuecomment-1342518459

   @jackwener Maybe you can refer to this
   
   https://docs.snowflake.com/en/sql-reference/constructs/having.html
   
   Per SnowFlake's doc, HAVING should apply to expressions produced by the GROUP BY.
   GROUP BY can include Alias. Today DataFusion does not merge the adjacent PROJECT and GROUP BY. In future we might
   add a rule to collapse the adjacent PROJECT and GROUP BY Aggregation, so that the GROUP BY exprs will include Alias.
   
   Some other docs for you to refer about the evaluation ordering of operators:
   
   https://docs.snowflake.com/en/sql-reference/constructs/qualify.html
   https://docs.teradata.com/r/Teradata-VantageTM-SQL-Data-Manipulation-Language/March-2019/Select-Statements/QUALIFY-Clause/Usage-Notes/Evaluation-Order-of-WHERE-GROUP-BY-and-QUALIFY-Clauses
   


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org