You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2014/07/27 20:51:44 UTC
[jira] [Commented] (DRILL-1180) Case messes up the datatype
returned by function surrounding it
[ https://issues.apache.org/jira/browse/DRILL-1180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14075697#comment-14075697 ]
Jacques Nadeau commented on DRILL-1180:
---------------------------------------
Fixed by caa8b78 or earlier
> Case messes up the datatype returned by function surrounding it
> ---------------------------------------------------------------
>
> Key: DRILL-1180
> URL: https://issues.apache.org/jira/browse/DRILL-1180
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Ramana Inukonda Nagaraj
> Assignee: DrillCommitter
> Priority: Critical
> Fix For: 0.4.0
>
> Attachments: DRILL-1180.patch
>
>
> Hit this while investigating tpch data variation between postgres and drill
> Simplified tpch14 to the following query:
> select
> sum(case
> when l.L_RETURNFLAG like 'R%'
> then l.l_extendedprice * (1 - l.l_discount)
> else 0
> end)
> from lineitem l;
> returns bigint in the case of drill and double in the case of postgres. Extendedprice and discount are double though.
> Drill:507996494
> Postgres:507996454.406699
> However when the case is removed and we use an equivalent filter instead drill and postgres return the same results:
> select
> sum(l.l_extendedprice * (1 - l.l_discount)
> from lineitem l where l.L_RETURNFLAG like 'R%';
> Postgres: 507996454.406699
> Drill: 5.0799645440669966E8
> This would explain the data mismatch for both TPCH14 and 8
> git.commit.id.abbrev=e5c2da0
--
This message was sent by Atlassian JIRA
(v6.2#6252)