2010YOUY01 opened a new issue, #11783: URL: https://github.com/apache/datafusion/issues/11783
### Describe the bug Aggregate function with filter is supported, see this [testcase](https://github.com/apache/datafusion/blob/0332eb569a5428ac385fe892ce7b5fb40d52c8c0/datafusion/sqllogictest/test_files/aggregate.slt#L4246-L4256) But the same query can't run in datafusion-cli ``` DataFusion CLI v40.0.0 > CREATE TABLE test_table (c1 INT, c2 INT, c3 INT); 0 row(s) fetched. Elapsed 0.115 seconds. > INSERT INTO test_table VALUES (1, 10, 50), (1, 20, 60), (2, 10, 70), (2, 20, 80), (3, 10, NULL); +-------+ | count | +-------+ | 5 | +-------+ 1 row(s) fetched. Elapsed 0.064 seconds. > SELECT c1, SUM(c2) FILTER (WHERE c2 >= 20), SUM(c2) FILTER (WHERE c2 < 1) FROM test_table GROUP BY c1; 🤔 Invalid statement: sql parser error: Expected end of statement, found: ( ``` ### To Reproduce _No response_ ### Expected behavior _No response_ ### Additional context _No response_ -- 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-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org