You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Aman Sinha (JIRA)" <ji...@apache.org> on 2015/06/24 00:10:42 UTC

[jira] [Resolved] (DRILL-3094) TPCH query 15 returns non-deterministic result

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

Aman Sinha resolved DRILL-3094.
-------------------------------
    Resolution: Won't Fix

Pls see previous comments and try the round() function.  I am closing this for now. 

> TPCH query 15 returns non-deterministic result
> ----------------------------------------------
>
>                 Key: DRILL-3094
>                 URL: https://issues.apache.org/jira/browse/DRILL-3094
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 1.0.0
>            Reporter: Abhishek Girish
>            Assignee: Aman Sinha
>
> Query 15:
> {code:sql}
> create or replace view revenue0 (supplier_no, total_revenue) as
>   select
>     l_suppkey,
>     sum(l_extendedprice * (1 - l_discount))
>   from
>     lineitem
>   where
>     l_shipdate >= date '1993-05-01'
>     and l_shipdate < date '1993-05-01' + interval '3' month
>   group by
>     l_suppkey;
> select
>   s.s_suppkey,
>   s.s_name,
>   s.s_address,
>   s.s_phone,
>   r.total_revenue
> from
>   supplier s,
>   revenue0 r
> where
>   s.s_suppkey = r.supplier_no
>   and r.total_revenue = (
>     select
>       max(total_revenue)
>     from
>       revenue0
>   )
> order by
>   s.s_suppkey;
> {code}
> Drill sometimes returns 0 rows and other times 1 row. Postgres always returns 1 row. 
> This is possibly due to the non-deterministic comparison of floating point values. 
> {code}total_revenue (calculated as sum(l_extendedprice * (1 - l_discount))){code} is compared with {code}max(total_revenue){code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)