andygrove commented on PR #2461: URL: https://github.com/apache/arrow-datafusion/pull/2461#issuecomment-1119823525
> I don't mind this change, but I think technically postgres supports HAVING in queries without aggregates: > > ```sql > ❯ select * from andrew having substr(location, 4) = 'et_sound'; > +-----------------+-------------+-------+-----------------+----------------+------------+ > | measurement | location | state | surface_degrees | bottom_degrees | timestamp | > +-----------------+-------------+-------+-----------------+----------------+------------+ > | h2o_temperature | puget_sound | WA | 55.8 | 40.2 | 1568756160 | > | h2o_temperature | puget_sound | WA | 55.8 | 40.2 | 1600756160 | > +-----------------+-------------+-------+-----------------+----------------+------------+ > 2 rows in set. Query took 0.013 seconds. > ``` hmm ok maybe we should not make this change then. Here is the test I was running in postgres: ``` postgres=# select id, name from book having price < 6; ERROR: column "book.id" must appear in the GROUP BY clause or be used in an aggregate function ``` This was with postgres 14.2 -- 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]
