alamb commented on PR #22132:
URL: https://github.com/apache/datafusion/pull/22132#issuecomment-4547722172
This is on main:
```sql
> create table foo as values (1);
0 row(s) fetched.
Elapsed 0.010 seconds.
> SELECT max(column1) FROM foo GROUP BY false HAVING false;
+------------------+
| max(foo.column1) |
+------------------+
| NULL |
+------------------+
1 row(s) fetched.
Elapsed 0.004 seconds.
```
Postgres rejects `GROUP BY false`:
```sql
postgres=# CREATE TABLE foo(column1 int);
insert into foo values (1);
SELECT max(column1) FROM foo GROUP BY false HAVING false;
CREATE TABLE
INSERT 0 1
ERROR: non-integer constant in GROUP BY
LINE 1: SELECT max(column1) FROM foo GROUP BY false HAVING false;
```
DuckDB returns 0 rows:
```shell
memory D CREATE TABLE foo(column1 int);
memory D insert into foo values (1);
memory D SELECT max(column1) FROM foo GROUP BY false HAVING false;
┌──────────────┐
│ max(column1) │
│ int32 │
└──────────────┘
0 rows
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]