You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Mehant Baid (JIRA)" <ji...@apache.org> on 2015/06/30 20:05:05 UTC

[jira] [Created] (DRILL-3429) DrillAvgVarianceConvertlet may produce wrong results while rewriting stddev, variance

Mehant Baid created DRILL-3429:
----------------------------------

             Summary: 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
             Fix For: 1.2.0


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)