hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stéphane (JIRA) <j...@apache.org>
Subject [jira] [Commented] (HIVE-21413) Bad result using UNION using same table
Date Mon, 11 Mar 2019 11:20:00 GMT

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

Stéphane commented on HIVE-21413:
---------------------------------

Yes, I confirm.

Using 
{quote}set hive.optimize.ppd=false;
{quote}

The result is correct.

 Thanks !

I really need to migrate to the latest version ! ;)

 

> Bad result using UNION using same table
> ---------------------------------------
>
>                 Key: HIVE-21413
>                 URL: https://issues.apache.org/jira/browse/HIVE-21413
>             Project: Hive
>          Issue Type: Bug
>          Components: hpl/sql
>    Affects Versions: 1.2.1
>         Environment: engine = mr
> TBLPROPERTIES(
>      'auto.purge'='true',
>      'orc.compress'='ZLIB',
>      'serialization.null.format'=''
>  )
>  
>            Reporter: Stéphane
>            Priority: Minor
>
> Hi,
> I have a table named "sau' with 1000 rows.
> The table structure is :
>   
> ||col_name||data_type||comment||
> |id|string| |
> |mnta|int| |
> |mntb|int| |
> {quote}select id, 'A' as info, mntA as mnt from sau
>  union
>  select id, 'B' as info, mntB as mnt from sau
> {quote}
> ==> return only rows with "info=B"
> {quote}with
> cte_union as (
>  select id, 'A' as info, mntA as mnt from sau
>  union
>  select id, 'B' as info, mntB as mnt from sau
>  )
>  select
>  count(*)
>  from
>  cte_union
> {quote}
> ==> return 1000 but should be 2000
>   
>  I don't know if this bug is fixed on new version.
> Using "union all" clause, the result is correct.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message