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
SOLR-16646: New function query operator isnan to verify if value is NaN #1331
Conversation
I tried running
|
@gabrielmagno looks like its related to your change. |
Thank you @risdenk , I ran There is now a problem on |
Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - only thing needed is solr/CHANGES.txt
entry
Thanks @gabrielmagno |
…aN (#1331) Co-authored-by: Mikhail Khludnev <mkhludnev@users.noreply.github.com>
https://issues.apache.org/jira/browse/SOLR-16646
Description
We created a new function query operator called
isnan
, that checks rather a value is a float NaN (not a number).Solution
A new Value Source parser called
isnan
was added. It will get the input value, treat it as a float and use the Java builtin functionFloat.isNaN
to verify if the value is NaN.Tests
We added a new assert in the
testBooleanFunctions
test that verifies four cases of NaN values:-
isnan(12.3456)
should befalse
;-
isnan(0)
should befalse
;-
isnan(div(0,0))
should betrue
;-
isnan(sqrt(-1))
should betrue
.Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.