alamb commented on issue #15291:
URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2734534317
> Unfortunately `datafusion-cli` parser fails at this request: doesn't like
opening brace before WHERE - that's why I made it as a test. Maybe I missing
something.
Maybe you can use
```sql
set datafusion.sql_parser.dialect = 'postgres';
```
```sql
> set datafusion.sql_parser.dialect = 'postgres';
0 row(s) fetched.
Elapsed 0.001 seconds.
> PREPARE req(BIGINT) AS
WITH aggregations_group AS (
SELECT
count(col_utf8) FILTER (WHERE $1 - 1 <= col_int64) as
foo,
count(col_utf8) FILTER (WHERE $1 - 2 <= col_int64 AND
col_uint32 >= 0) as bar,
count(col_utf8) FILTER (WHERE $1 - 2 <= col_int64 AND
col_uint32 >= 0) as baz
FROM test
)
SELECT * FROM aggregations_group;
Error during planning: table 'datafusion.public.test' not found
```
--
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]