Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 65CAF18891 for ; Sat, 27 Feb 2016 22:06:19 +0000 (UTC) Received: (qmail 19584 invoked by uid 500); 27 Feb 2016 22:06:18 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 19514 invoked by uid 500); 27 Feb 2016 22:06:18 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 19504 invoked by uid 99); 27 Feb 2016 22:06:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Feb 2016 22:06:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 251282C14F8 for ; Sat, 27 Feb 2016 22:06:18 +0000 (UTC) Date: Sat, 27 Feb 2016 22:06:18 +0000 (UTC) From: =?utf-8?Q?Tom=C3=A1s_Fern=C3=A1ndez_L=C3=B6bbe_=28JIRA=29?= To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-8671) Date statistics: make "sum" a double instead of a long/date MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-8671?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D15170= 735#comment-15170735 ]=20 Tom=C3=A1s Fern=C3=A1ndez L=C3=B6bbe commented on SOLR-8671: --------------------------------------------- I added this change:=20 {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=C3=A1s Fern=C3=A1ndez L=C3=B6bbe > Assignee: Tom=C3=A1s Fern=C3=A1ndez L=C3=B6bbe > Fix For: master > > Attachments: 0001-change-date-sum-to-double.patch > > > Currently {{DateStatsValues#sum}} is defined as long, and returned as a d= ate. This has two problems: It overflows (with ~6 million values), and the = return value can be a date like {{122366-06-12T21:06:06Z= }}. I think we should just change this stat to a double. See SOLR-84= 20. > I think we can change this only in master, since it will break backward c= ompatibility. -- 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