hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fatkun (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-11335) Multi-Join Inner Query producing incorrect results
Date Wed, 22 Jul 2015 03:38:04 GMT

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

fatkun updated HIVE-11335:
--------------------------
    Description: 
test step

{code}
create table log (uid string, uid2 string);
insert into log values ('1', '1');

create table user (uid string, name string);
insert into user values ('1', "test1");

select b.name, c.name from log a
 left outer join (select uid, name from user) b on (a.uid=b.uid)
 left outer join user c on (a.uid2=c.uid);

{code}
return wrong result:
1	test1

It should be both return test1

I try to find error, if I use this query, return right result.(join key different)
{code}
select b.name, c.name from log a
 left outer join (select uid, name from user) b on (a.uid=b.uid)
 left outer join user c on (a.uid=c.uid);
{code}

The explain is different,Query1 only select one colum
{code}
        b:user 
          TableScan
            alias: user
            Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE
            Select Operator
              expressions: uid (type: string)
              outputColumnNames: _col0
{code}
I think there is something wrong in ColumnPruner.But i cannot find it out.
It may relate HIVE-10996




  was:
test step

```
create table log (uid string, uid2 string);
insert into log values ('1', '1');

create table user (uid string, name string);
insert into user values ('1', "test1");

select b.name, c.name from log a
 left outer join (select uid, name from user) b on (a.uid=b.uid)
 left outer join user c on (a.uid2=c.uid);

```
return wrong result:
1	test1

It should be both return test1

I try to find error, if I use this query, return right result.(join key different)
```
select b.name, c.name from log a
 left outer join (select uid, name from user) b on (a.uid=b.uid)
 left outer join user c on (a.uid=c.uid);
```

The explain is different,Query1 only select one colum
```
        b:user 
          TableScan
            alias: user
            Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE
            Select Operator
              expressions: uid (type: string)
              outputColumnNames: _col0
```
I think there is something wrong in ColumnPruner.But i cannot find it out.
It may relate HIVE-10996





> Multi-Join Inner Query producing incorrect results
> --------------------------------------------------
>
>                 Key: HIVE-11335
>                 URL: https://issues.apache.org/jira/browse/HIVE-11335
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Planning
>    Affects Versions: 1.1.0
>         Environment: CDH5.4.0
>            Reporter: fatkun
>
> test step
> {code}
> create table log (uid string, uid2 string);
> insert into log values ('1', '1');
> create table user (uid string, name string);
> insert into user values ('1', "test1");
> select b.name, c.name from log a
>  left outer join (select uid, name from user) b on (a.uid=b.uid)
>  left outer join user c on (a.uid2=c.uid);
> {code}
> return wrong result:
> 1	test1
> It should be both return test1
> I try to find error, if I use this query, return right result.(join key different)
> {code}
> select b.name, c.name from log a
>  left outer join (select uid, name from user) b on (a.uid=b.uid)
>  left outer join user c on (a.uid=c.uid);
> {code}
> The explain is different,Query1 only select one colum
> {code}
>         b:user 
>           TableScan
>             alias: user
>             Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats:
NONE
>             Select Operator
>               expressions: uid (type: string)
>               outputColumnNames: _col0
> {code}
> I think there is something wrong in ColumnPruner.But i cannot find it out.
> It may relate HIVE-10996



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

Mime
View raw message