[
https://issues.apache.org/jira/browse/SOLR-4911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701782#comment-13701782
]
Bill Bell commented on SOLR-4911:
---------------------------------
There might be a bug.
+ if(valsArr.length == 0)return 0.0f;
+ float val = Float.POSITIVE_INFINITY;
should it return Float.POSITIVE_INFINITY; ?
+ if (valsArr.length == 0) return 0.0f;
+ float val = Float.NEGATIVE_INFINITY;
And this return Float.NEGATIVE_INFINITY; ?
I know the original code always returned 0.0f but wou;dn't this set the floor
or ceiling as 0.0f?
> Small refactor to make max and min float return values quicker
> --------------------------------------------------------------
>
> Key: SOLR-4911
> URL: https://issues.apache.org/jira/browse/SOLR-4911
> Project: Solr
> Issue Type: Improvement
> Reporter: Yogi Valani
> Assignee: Erick Erickson
> Priority: Trivial
> Labels: patch
> Fix For: 5.0, 4.4
>
> Attachments: SOLR-4911.patch
>
>
> Refactored function 'func' in MaxFloatFunction.java and
> MinFloatFunction.java. Removed if statement out of loop.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]