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
When #44745 has been introduced as a way of aggregations (SUM, MAX, AVG etc) dealing with a lack of documents matching a query and, implicitly, dealing with NULLs the case of COUNT(DISTINCT) (that uses a cardinality aggregation behind the scene) has been approached as well.
But, this introduced the issue of returning a NULL for COUNT(DISTINCT) where there are no matching documents. For example SELECT COUNT(DISTINCT languages) FROM test_emp WHERE languages > 100 returns NULL, whereas it should return 0 since there are no documents matching the condition languages > 100.
The text was updated successfully, but these errors were encountered:
When #44745 has been introduced as a way of aggregations (SUM, MAX, AVG etc) dealing with a lack of documents matching a query and, implicitly, dealing with NULLs the case of COUNT(DISTINCT) (that uses a
cardinality
aggregation behind the scene) has been approached as well.But, this introduced the issue of returning a
NULL
forCOUNT(DISTINCT)
where there are no matching documents. For exampleSELECT COUNT(DISTINCT languages) FROM test_emp WHERE languages > 100
returnsNULL
, whereas it should return0
since there are no documents matching the conditionlanguages > 100
.The text was updated successfully, but these errors were encountered: