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

[jira] [Updated] (DRILL-502) Avg function against decimal data returns incorrect result from drill

     [ https://issues.apache.org/jira/browse/DRILL-502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mehant Baid updated DRILL-502:
------------------------------

    Component/s: Functions - Drill

> Avg function against decimal data returns incorrect result from drill
> ---------------------------------------------------------------------
>
>                 Key: DRILL-502
>                 URL: https://issues.apache.org/jira/browse/DRILL-502
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>    Affects Versions: 1.0.0
>            Reporter: Krystal
>         Attachments: student.parquet
>
>
> Ran the following sql query:
> 0: jdbc:drill:schema=dfs> select avg(gpa) from dfs.`student`;
> +------------+
> |   EXPR$0   |
> +------------+
> | 1.999      |
> +------------+
> 1 row selected (0.22 seconds)
> The same query against the same dataset from oracle, postgres and impala returns value of 2.49826.
> Here is the schema of the student table:
> message pig_schema {
>   optional int32 rownum;
>   optional binary name;
>   optional int32 age;
>   optional double gpa;
>   optional int64 studentnum;
>   optional binary create_time;
> }
> The same avg function against int data types returns correct result.



--
This message was sent by Atlassian JIRA
(v6.2#6252)