This message was deleted.
# general
s
This message was deleted.
d
It is usual on databases to give the count where the column is non null. But if you
count(1)
or
count(*)
you will get the true row count.
b
I suspect count(column_x) might not include nulls, maybe depending on the useDefaultValueForNull setting. If you count(1) where column_x is null, does that and the other count add up to count(1)?
(elaborating on what David said)
j
+1 ... count() in general does not count nulls (along with some of the other agg functions), so if you are counting a specific column or expression and it evaluates to null then it should not be counted. However, that assumes you are operating in SQL Null handling mode, e.g.
druid.generic.useDefaultValueForNull=false
I imagine if you are not in this mode then you will be defaulting your NULLs and your two counts would be the same.
s
okay thanks