hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Vary (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-21413) Bad result using UNION using same table
Date Fri, 08 Mar 2019 14:38:00 GMT

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

Peter Vary commented on HIVE-21413:
-----------------------------------

[~Andreu]: Most probably you are facing HIVE-15680, and his friends (see the "related to"
jiras). AFAIK this is fixed for Hive on Spark and Hive on Tez for newer versions, but there
still can be some problems with Hive on MR when different filters are pushed down to the TableScan
operators. If you turn off the PPD, I think is ok in Hive on MR too.

> 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