hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gopal V (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-13623) Hive on tez produce wrong results when withClause and (outer) joins
Date Mon, 27 Mar 2017 15:36:41 GMT

    [ https://issues.apache.org/jira/browse/HIVE-13623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15943480#comment-15943480
] 

Gopal V commented on HIVE-13623:
--------------------------------

This bug might be a dup of HIVE-14027

> 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.15#6346)

Mime
View raw message