Hello Pinot community, long time no see :slightly_...
# troubleshooting
j
Hello Pinot community, long time no see 🙂 Is there any way for
SUM
to not return 0 when there's actually no values to aggregate ? i.e. return
null
in such case
m
Long time no see @User. Do you mean no rows selected, or rows selected are null?
j
Good question I was thinking when there's no row selected
m
Then the result should be empty iirc
j
I remember asking this same question (couldn't find it back) and someone answered with a link to Pinot docs showing that aggregations have some kind of default values
From my testing it returns 0
image.png
m
Yeah that seems to be the case, which is different from what I recall. @User didn’t we use to return empty results in such cases?
j
No, for each aggregation function, there is a default value if no record is selected
j
Yeah that's what I remembered, thanks @User Mind sharing the associated docs ? Couldn't find it back 😶
j
Seems the doc has been updated and I cannot find it either 😅
😄 1
Let me update the doc to include them
j
I was sure it already existed lol
j
Perfect Thanks @User !
Thanks @User too Have a good day
👍 1
m
I think it is the agrr+group by that returns empty results if no records selected.