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

Jacques Nadeau commented on DRILL-502:
--------------------------------------

fixed at or before 4198a17

> 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
>            Assignee: DrillCommitter
>             Fix For: 1.0.0-BETA1
>
>         Attachments: DRILL-502.patch, 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)

Reply via email to