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/05/07 17:40:42 UTC

[GitHub] [arrow-datafusion] drusso commented on pull request #2461: Do not allow HAVING clause in non-aggregate queries

drusso commented on PR #2461:
URL: https://github.com/apache/arrow-datafusion/pull/2461#issuecomment-1120248968

   Hi Andrew and Andy. This behaviour dates back to the [initial](https://github.com/apache/arrow/pull/9364) implementation, so I can try to provide some context. The [select_with_having](https://github.com/apache/arrow-datafusion/blob/6786203ea8c9c4cfe604f74a5cece8e829fb56c8/datafusion/core/src/sql/planner.rs#L2818) and [select_with_having_referencing_column_not_in_select](https://github.com/apache/arrow-datafusion/blob/6786203ea8c9c4cfe604f74a5cece8e829fb56c8/datafusion/core/src/sql/planner.rs#L2829) cases are there, almost certainly, because those queries are valid in MySQL 8. I used both Postgres and MySQL as a reference for the implementation, and in this particular case, opted for the MySQL behaviour, since it's the more permissive of the two. I think since then, Postgres has been adopted as the reference. 


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