You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "gabrielmagno (via GitHub)" <gi...@apache.org> on 2023/02/03 20:26:21 UTC

[GitHub] [solr] gabrielmagno opened a new pull request, #1331: SOLR-16646: New function query operator to verify if value is NaN (isnan)

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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] gabrielmagno commented on pull request #1331: SOLR-16646: New function query operator to verify if value is NaN (isnan)

Posted by "gabrielmagno (via GitHub)" <gi...@apache.org>.
gabrielmagno commented on PR #1331:
URL: https://github.com/apache/solr/pull/1331#issuecomment-1416400727

   > @gabrielmagno looks like its related to your change. `./gradlew tidy` may fix it. I see in `[solr/core/src/java/org/apache/solr/search/ValueSourceParser.java](https://github.com/apache/solr/pull/1331/files#diff-d13890bf504c239f648ea33d439b4e5d489594683190fd5ab2fc6ce68313dd0c)` that indentation is off compared to the other examples above and below. I'm guessing your editor has tabs instead of spaces.
   
   Thank you @risdenk , I ran `./gradlew tidy` and it is fixed. 
   
   There is now a problem on `QueryEqualityTest`. I will work on that.


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] gabrielmagno commented on pull request #1331: SOLR-16646: New function query operator to verify if value is NaN (isnan)

Posted by "gabrielmagno (via GitHub)" <gi...@apache.org>.
gabrielmagno commented on PR #1331:
URL: https://github.com/apache/solr/pull/1331#issuecomment-1416440411

   Fixed. `gradlew check` seems to be running fine now!


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] gabrielmagno commented on pull request #1331: SOLR-16646: New function query operator to verify if value is NaN (isnan)

Posted by "gabrielmagno (via GitHub)" <gi...@apache.org>.
gabrielmagno commented on PR #1331:
URL: https://github.com/apache/solr/pull/1331#issuecomment-1416369277

   I tried running `./gradlew check`, but I got an error that I'm not sure if it is related to my changes or is a bug from upstream master:
   ```
   * What went wrong:
   Execution failed for task ':solr:core:validateSourcePatterns'.
   > Found source pattern violations (skip with -Pvalidation.sourcePatterns.failOnError=false):
     UTF-8 byte order mark
     tabs instead spaces\
   ```


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk commented on pull request #1331: SOLR-16646: New function query operator isnan to verify if value is NaN

Posted by "risdenk (via GitHub)" <gi...@apache.org>.
risdenk commented on PR #1331:
URL: https://github.com/apache/solr/pull/1331#issuecomment-1419504090

   Thanks @gabrielmagno 


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk merged pull request #1331: SOLR-16646: New function query operator isnan to verify if value is NaN

Posted by "risdenk (via GitHub)" <gi...@apache.org>.
risdenk merged PR #1331:
URL: https://github.com/apache/solr/pull/1331


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk commented on pull request #1331: SOLR-16646: New function query operator to verify if value is NaN (isnan)

Posted by "risdenk (via GitHub)" <gi...@apache.org>.
risdenk commented on PR #1331:
URL: https://github.com/apache/solr/pull/1331#issuecomment-1416375388

   @gabrielmagno looks like its related to your change. `./gradlew tidy` may fix it. I see in `[solr/core/src/java/org/apache/solr/search/ValueSourceParser.java](https://github.com/apache/solr/pull/1331/files#diff-d13890bf504c239f648ea33d439b4e5d489594683190fd5ab2fc6ce68313dd0c)` that indentation is off compared to the other examples above and below. I'm guessing your editor has tabs instead of spaces.


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org