You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> SELECT g, COUNT(a) FILTER (WHERE b < 1) AS count_a
FROM (VALUES (0, 1, CAST(NULL AS INT)), (0, 2, 2)) AS t(g, a, b)
GROUP BY g;
+---+---------+
| g | count_a |
+---+---------+
| 0 | 1 |
+---+---------+
1 row(s) fetched.
Elapsed 0.016 seconds.
This is incorrect; Postgres returns 0, 0 because no rows pass the filter. DF looks at the two-valued boolean result of the filter (true/false) and doesn't check the NULL bitmap.
Describe the bug
This is incorrect; Postgres returns
0, 0because no rows pass the filter. DF looks at the two-valued boolean result of the filter (true/false) and doesn't check the NULL bitmap.To Reproduce
No response
Expected behavior
No response
Additional context
No response