[
https://issues.apache.org/jira/browse/DRILL-3586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Parth Chandra updated DRILL-3586:
---------------------------------
Fix Version/s: 1.3.0
> Sum of values not correctly calculated
> --------------------------------------
>
> Key: DRILL-3586
> URL: https://issues.apache.org/jira/browse/DRILL-3586
> Project: Apache Drill
> Issue Type: Bug
> Components: Functions - Drill
> Affects Versions: 1.1.0
> Reporter: Uwe Geercken
> Assignee: Hanifi Gunes
> Fix For: 1.3.0
>
>
> I have a column "value" containing numeric values only - but the column was
> defined as String when creating the parquet files using the CTAS statement.
> I have 163 records being returned from the query. When I run a sum on the
> values like this - cast to double:
> select count(1),sum(cast(`value` as double)) as total from
> dfs.datatransfer.<tablename> where key_account_id='xxxxx'
> then the result is: 213.42000000000002
> when I cast to float instead:
> select count(1),sum(cast(`value` as float)) as total from
> dfs.datatransfer.<tablename> where key_account_id='xxxxx'
> then the result is: 213.4200000166893
> summing up the values in the original system (MySQL) then the real and
> correct sum is: 213.42.
> I checked the data manually and the sum from the origin system is correct.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)