You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Sivashankar (JIRA)" <ji...@apache.org> on 2016/04/28 22:54:17 UTC

[jira] [Assigned] (HIVE-13623) Hive on tez produce wrong results when withClause and (outer) joins

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

Sivashankar reassigned HIVE-13623:
----------------------------------

    Assignee: Sivashankar

> Hive on tez produce wrong results when withClause and (outer) joins
> -------------------------------------------------------------------
>
>                 Key: HIVE-13623
>                 URL: https://issues.apache.org/jira/browse/HIVE-13623
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.1.0, 2.0.0
>            Reporter: JinsuKim
>            Assignee: Sivashankar
>            Priority: Trivial
>
> Hive on mr produce correct results when (outer) joins and withClause. But tez produce wrong results 
> {code:sql|title=Case1}
> with a as (
> select 1 as c1
> union all
> select 2 as c1
> union all
> select 3 as c1
> ),
> b as (
> select 1 as c1
> )
> select * 
>   from ( select a.c1 as ac1, b.c1 as bc1 
>          from a left outer join b 
>          on a.c1 = b.c1 
>        ) c;
>   where c.bc1 is null
> {code}
> {code:title=case1 result}
> mr :
> +--------+--------+--+
> | c.ac1  | c.bc1  |
> +--------+--------+--+
> | 2      | NULL   |
> | 3      | NULL   |
> +--------+--------+--+
> tez :
> +--------+--------+--+
> | c.ac1  | c.bc1  |
> +--------+--------+--+
> +--------+--------+--+
> {code}
> Case2 as similar to Case1 produces same results.
> {code:sql|title=Case2}
> with a as (
> select * from j1
> ),
> b as (
> select * from j2
> )
> select * 
>   from ( select a.c1 as ac1, b.c1 as bc1 
>          from a left outer join b 
>          on a.c1 = b.c1 
>        ) c
>   where c.bc1 is null;
>   
> drop table j1;
> create table j1 as select c1 from 
> ( select 1 as c1 from default.dual
> union all
> select 2 as c1 from default.dual
> union all
> select 3 as c1 from default.dual
> ) t1;
> drop table j2;
> create table j2 as
> select 1 as c1 from default.dual;
> {code}
> {code:title=case2 result}
> mr :
> +--------+--------+--+
> | c.ac1  | c.bc1  |
> +--------+--------+--+
> | 2      | NULL   |
> | 3      | NULL   |
> +--------+--------+--+
> tez :
> +--------+--------+--+
> | c.ac1  | c.bc1  |
> +--------+--------+--+
> | 2      | NULL   |
> | 3      | NULL   |
> +--------+--------+--+
> {code}



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