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
This issue does not seem to reproduce anymore. AUTO_BUCKET function was renamed as BUCKET and is now only allowed as a grouping function, so the queries above return a validation exception.
The following queries return NULL as expected.
ROW a = 1 | stats max(a) by BUCKET(1, 0, 0, 0)
ROW a = 1 | stats max(a) by BUCKET(1, -1, 0, 0)
ROW a = 1 | stats max(a) by BUCKET(0, 100000000000, 0, 0)
Internally, some parts of the code still produce a NaN, but downstream it is resolved to NULL.
I'll add some tests, then I think this can be closed.
Description
Specifying a zero as the number of buckets with numeric field will return
NaN
instead ofnull
(due to div by 0).Ex:
ROW AUTO_BUCKET(1, 0, 0, 0)
Same for negative number of buckets (due to log10(negative)).
Ex:
ROW AUTO_BUCKET(1, -1, 0, 0)
Same for a number of buckets value that wraps over int (due to int overflow).
Ex:
ROW AUTO_BUCKET(0, 100000000000, 0, 0)
Related: #98698.
The text was updated successfully, but these errors were encountered: