You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2014/05/20 18:02:43 UTC

[jira] [Resolved] (DRILL-661) join query produces inconsistent result set

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

Jacques Nadeau resolved DRILL-661.
----------------------------------

    Resolution: Fixed

> join query produces inconsistent result set
> -------------------------------------------
>
>                 Key: DRILL-661
>                 URL: https://issues.apache.org/jira/browse/DRILL-661
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Zhiyong Liu
>
> In sqlline, submit the following query multiple times:
> select count(*)
>   from (select l.l_orderkey as x, c.c_custkey as y
>         from lineitem l
>         left outer join customer c
>                         on l.l_orderkey = c.c_custkey) as foo
>   where y < 10000;
> Observation:
> Exactly the same query executed in Postgres produces the following:
>  count
> -------
>   1467
> (1 row)
> In drill via, results are different each time it is submitted:
> 0: jdbc:drill:schema=dfs.TpcH001> select count(*)
> . . . . . . . . . . . . . . . . >   from (select l.l_orderkey as x, c.c_custkey as y
> . . . . . . . . . . . . . . . . >         from lineitem l                           
> . . . . . . . . . . . . . . . . >         left outer join customer c                
> . . . . . . . . . . . . . . . . >                         on l.l_orderkey = c.c_custkey) as foo
> . . . . . . . . . . . . . . . . >   where y < 10000;                                           
> +------------+                                                                                 
> |   EXPR$0   |                                                                                 
> +------------+                                                                                 
> | 45748      |                                                                                 
> +------------+                                                                                 
> 1 row selected (3.592 seconds)
> 0: jdbc:drill:schema=dfs.TpcH001> select count(*)                                              
> . . . . . . . . . . . . . . . . >   from (select l.l_orderkey as x, c.c_custkey as y           
> . . . . . . . . . . . . . . . . >         from lineitem l                                      
> . . . . . . . . . . . . . . . . >         left outer join customer c                           
> . . . . . . . . . . . . . . . . >                         on l.l_orderkey = c.c_custkey) as foo
> . . . . . . . . . . . . . . . . >   where y < 10000;                                           
> +------------+                                                                                 
> |   EXPR$0   |                                                                                 
> +------------+                                                                                 
> | 32292      |                                                                                 
> +------------+                                                                                 
> 1 row selected (3.532 seconds)
> 0: jdbc:drill:schema=dfs.TpcH001> select count(*)
> . . . . . . . . . . . . . . . . >   from (select l.l_orderkey as x, c.c_custkey as y
> . . . . . . . . . . . . . . . . >         from lineitem l
> . . . . . . . . . . . . . . . . >         left outer join customer c
> . . . . . . . . . . . . . . . . >                         on l.l_orderkey = c.c_custkey) as foo
> . . . . . . . . . . . . . . . . >   where y < 10000;
> +------------+
> |   EXPR$0   |
> +------------+
> | 35970      |
> +------------+
> 1 row selected (3.57 seconds)



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