Hello! What does it mean when `-Infinity` is retur...
# troubleshooting
g
Hello! What does it mean when
-Infinity
is returned?
m
One possibility is that you have nulls in your data, that may have been replaced by int/long min
If so then you want to ensure the column being averaged is defined as metric in the schema
Also we have added native null support that will be available in upcoming release
πŸ‘ 1
k
For Float, the default value for a dimension column is
Float.NEGATIVE_INFINITY
(see https://docs.pinot.apache.org/basics/components/schema#data-types). As @Mayank suggested, you want to define the column as metric in your schema so the default value is 0 (or explicitly exclude rows with null values in the query).
βž• 1
g
@Yash Agarwal ^^ are our columns defines as a metric?
Ok thank you!
πŸ‘ 1
y
Yes @Grace Walkuski the columns are defined as metric, will dig into it a bit.
thankyou 1
πŸ‘ 1
@Mayank @Ken Krugler @Grace Walkuski it looks like avg is returning -Infinity when there are no records selected.
m
Can you check if the column you are `sum`’ing is a dimension or a metric in the schema @Yash Agarwal?
y
Let me confirm.
It is metric. Sum is returning 0, Count is returning 0 and hence avg is returning -Infinity.
m
I see. I think that is likely by design, to let the caller know that no rows were actually selected.
If so, we should document this. cc: @Mark Needham