lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomás Fernández Löbbe (JIRA) <j...@apache.org>
Subject [jira] [Commented] (SOLR-8671) Date statistics: make "sum" a double instead of a long/date
Date Sat, 27 Feb 2016 22:06:18 GMT

    [ https://issues.apache.org/jira/browse/SOLR-8671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15170735#comment-15170735
] 

Tomás Fernández Löbbe commented on SOLR-8671:
---------------------------------------------

I added this change: 
{noformat}
-    return Math.sqrt(((count * sumOfSquares) - (sum * (double)sum))
+    return Math.sqrt(((count * sumOfSquares) - (sum * sum))
{noformat}
since sum is now a double

> Date statistics: make "sum" a double instead of a long/date
> -----------------------------------------------------------
>
>                 Key: SOLR-8671
>                 URL: https://issues.apache.org/jira/browse/SOLR-8671
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Tomás Fernández Löbbe
>            Assignee: Tomás Fernández Löbbe
>             Fix For: master
>
>         Attachments: 0001-change-date-sum-to-double.patch
>
>
> Currently {{DateStatsValues#sum}} is defined as long, and returned as a date. This has
two problems: It overflows (with ~6 million values), and the return value can be a date like
{{<date name="sum">122366-06-12T21:06:06Z</date>}}. I think we should just change
this stat to a double. See SOLR-8420.
> I think we can change this only in master, since it will break backward compatibility.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message