gabrielmagno opened a new pull request, #1331: URL: https://github.com/apache/solr/pull/1331
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 function `Float.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 be `false`; - `isnan(0)` should be `false`; - `isnan(div(0,0))` should be `true`; - `isnan(sqrt(-1))` should be `true`. # Checklist Please review the following and check all that apply: - [X] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability. - [X] I have created a Jira issue and added the issue ID to my pull request title. - [X] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended) - [X] I have developed this patch against the `main` branch. - [ ] I have run `./gradlew check`. - [X] I have added tests for my changes. - [X] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
