[
https://issues.apache.org/jira/browse/SOLR-8420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15166636#comment-15166636
]
ASF subversion and git services commented on SOLR-8420:
-------------------------------------------------------
Commit 730d10f145378b164a93d63b82a02dcf7f2fdf14 in lucene-solr's branch
refs/heads/master from Tomas Fernandez Lobbe
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=730d10f ]
SOLR-8420: Fix long overflow in sumOfSquares for Date statistics
Casted operations to double. Changed the test to support a percentage error
given the FUZZY flag in doubles
> Date statistics: sumOfSquares overflows long
> --------------------------------------------
>
> Key: SOLR-8420
> URL: https://issues.apache.org/jira/browse/SOLR-8420
> Project: Solr
> Issue Type: Bug
> Components: SearchComponents - other
> Affects Versions: 5.4
> Reporter: Tom Hill
> Assignee: Tomás Fernández Löbbe
> Priority: Minor
> Attachments: 0001-Fix-overflow-in-date-statistics.patch,
> 0001-Fix-overflow-in-date-statistics.patch,
> 0001-Fix-overflow-in-date-statistics.patch, SOLR-8420.patch, StdDev.java
>
>
> The values for Dates are large enough that squaring them overflows a "long"
> field. This should be converted to a double.
> StatsValuesFactory.java, line 755 DateStatsValues#updateTypeSpecificStats Add
> a cast to double
> sumOfSquares += ( (double)value * value * count);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]