-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESQL: replace Float/Double NaN with null #98698
Comments
Pinging @elastic/es-ql (Team:QL) |
Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL) |
As I said at the meeting yesterday, I think it's less important which option we pick, so long as we pick one and do it consistently in all functions. This has an advantage that it's easier to test - if nothing should return Would we also collapse the infinities into |
Relates to #98698 Add asserts that we aren't returning NaN or Infinite values from scalar functions. I also fixed the functions that already had test cases returning NaN/Infinite values. Note that this doesn't fix all our scalar functions, as some may just not have test cases that hit these outputs regularly, which is why this PR doesn't close the above issue.
Just noting this for future lookups:
We practically have: Lines 77 to 83 in 722853e
|
@bpintea Yes, that's correct. We decided that |
Pinging @elastic/es-analytics-geo (Team:Analytics) |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Save for a few bugs, I believe we've done this work. |
Description
Floating number (Float and Double) provide a special, out of band value - NaN, Not-a-Number.
This occurs typically when dividing a number by zero; integer numbers don't have one and instead thrown an error.
To make things consistent, I propose we treat and convert NaN internally to null so it never reaches the user.
Several arguments to support this:
The text was updated successfully, but these errors were encountered: