pchintar commented on code in PR #22774: URL: https://github.com/apache/datafusion/pull/22774#discussion_r3367427089
########## datafusion/sqllogictest/test_files/aggregate.slt: ########## @@ -6266,6 +6266,40 @@ GROUP BY g ---- 0 0 +# query_with_untyped_null_filter +query I +SELECT count(*) FILTER (WHERE NULL) +---- +0 + +query I +SELECT count(1) FILTER (WHERE NULL) +---- +0 + +query I +SELECT sum(1) FILTER (WHERE NULL) +---- +NULL + +query R +SELECT avg(1) FILTER (WHERE NULL) +---- +NULL + +# window_aggregate_with_untyped_null_filter +query I +SELECT count(*) FILTER (WHERE NULL) OVER () +FROM (VALUES (1)) AS t(x) +---- +0 + +query I +SELECT sum(1) FILTER (WHERE NULL) OVER () +FROM (VALUES (1)) AS t(x) +---- +NULL + Review Comment: Thanks @nuno-faria , and thanks for checking the predicate behavior against DuckDB/Postgres too. I put these in aggregate.slt because the failure is in aggregate FILTER handling and there are already related aggregate/window aggregate cases here. So, Keeping the new cases alongside the existing aggregate `FILTER` coverage felt more consistent to me. -- 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]
