Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A285418644 for ; Thu, 8 Oct 2015 20:50:27 +0000 (UTC) Received: (qmail 81317 invoked by uid 500); 8 Oct 2015 20:50:27 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 81286 invoked by uid 500); 8 Oct 2015 20:50:27 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 81276 invoked by uid 99); 8 Oct 2015 20:50:27 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2015 20:50:27 +0000 Date: Thu, 8 Oct 2015 20:50:27 +0000 (UTC) From: "Mehant Baid (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-3429) DrillAvgVarianceConvertlet may produce wrong results while rewriting stddev, variance MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-3429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mehant Baid updated DRILL-3429: ------------------------------- Attachment: DRILL-3429.patch > DrillAvgVarianceConvertlet may produce wrong results while rewriting stddev, variance > ------------------------------------------------------------------------------------- > > Key: DRILL-3429 > URL: https://issues.apache.org/jira/browse/DRILL-3429 > Project: Apache Drill > Issue Type: Bug > Reporter: Mehant Baid > Assignee: Mehant Baid > Priority: Critical > Fix For: 1.3.0 > > Attachments: DRILL-3429.patch > > > DrillAvgVarianceConvertlet currently rewrites aggregate functions like avg, stddev, variance to simple computations. > Eg: > Stddev( x ) => power( > (sum(x * x) - sum( x ) * sum( x ) / count( x )) > / count( x ), > .5) > Consider the case when the input is an integer. Now the rewrite contains multiplication and division, which will bind to functions that operate on integers however the expected result should be a double and since double has more precision than integer we should be operating on double during the multiplication and division. -- This message was sent by Atlassian JIRA (v6.3.4#6332)