Phoenix500526 commented on code in PR #27117:
URL: https://github.com/apache/datafusion/pull/27117#discussion_r4551462467


##########
datafusion/sqllogictest/test_files/push_down_filter_regression.slt:
##########
@@ -4,6 +4,22 @@
 
 # Test push down filter
 
+# Regression test for https://github.com/apache/datafusion/issues/26545
+# Pushing the filter below COUNT(*) would return one row containing zero.
+query I
+SELECT c FROM (
+  SELECT 'all' AS k, COUNT(*) AS c FROM (VALUES (1)) AS t(a)
+) AS s WHERE k = 'none';
+----
+
+# The empty grouping set in ROLLUP also produces a grand total on empty input.
+query II
+SELECT a, c FROM (
+  SELECT a, 'all' AS k, COUNT(*) AS c FROM (VALUES (1)) AS t(a)
+  GROUP BY ROLLUP(a)
+) AS s WHERE k = 'none';

Review Comment:
   Added



-- 
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]

Reply via email to