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/05 22:57:19 UTC

[GitHub] [arrow-datafusion] andygrove opened a new issue, #2460: SQL planner allows `HAVING` clause in non-aggregate queries

andygrove opened a new issue, #2460:
URL: https://github.com/apache/arrow-datafusion/issues/2460

   **Describe the bug**
   DataFusion currently supports the `HAVING` clause in non-aggregate queries, as demonstrated in this test:
   
   ``` rust
   #[test]
   fn select_with_having() {
       let sql = "SELECT id, age
                  FROM person
                  HAVING age > 100 AND age < 200";
       let expected = "Projection: #person.id, #person.age\
                       \n  Filter: #person.age > Int64(100) AND #person.age < Int64(200)\
                       \n    TableScan: person projection=None";
       quick_test(sql, expected);
   }
   ```
   
   **To Reproduce**
   N/A
   
   **Expected behavior**
   Neither Postgres nor Spark support this use case. We should fail to plan non-aggregate queries that use a `HAVING` clause.
   
   **Additional context**
   None
   


-- 
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.apache.org

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


Re: [I] SQL planner allows `HAVING` clause in non-aggregate queries [datafusion]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on issue #2460:
URL: https://github.com/apache/datafusion/issues/2460#issuecomment-3307077499

   Resolved by #4579


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] SQL planner allows `HAVING` clause in non-aggregate queries [datafusion]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey closed issue #2460: SQL planner allows `HAVING` clause in non-aggregate queries
URL: https://github.com/apache/datafusion/issues/2460


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org