hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Namit Jain (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-3988) lateral view followed by mapjoin should not be allowed
Date Tue, 05 Feb 2013 08:34:13 GMT

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

Namit Jain updated HIVE-3988:
-----------------------------

    Description: 
Consider the following queries:

drop table lazy_array_map;
create table lazy_array_map (map_col map<int,string>, array_col array <string>
);
INSERT OVERWRITE TABLE lazy_array_map select map(1,'one',2,'two',3,'three'), array('100','200','300')
FROM src LIMIT 1;

select /*+ MAPJOIN(a) */ * from
(SELECT array_col, myCol from lazy_array_map lateral view explode(array_col) X AS myCol) subq1
join
src a
on subq1.myCol = a.key;

select /*+ MAPJOIN(subq1) */ * from
(SELECT array_col, myCol from lazy_array_map lateral view explode(array_col) X AS myCol) subq1
join
src a
on subq1.myCol = a.key;


The last 2 queries should throw an error, but they work fine right now.
The same affect can be achieved without a mapjoin hint.

  was:
Consider the following queries:

drop table lazy_array_map;
create table lazy_array_map (map_col map<int,string>, array_col array<string>);
INSERT OVERWRITE TABLE lazy_array_map select map(1,'one',2,'two',3,'three'), array('100','200','300')
FROM src LIMIT 1;

select /*+ MAPJOIN(a) */ * from
(SELECT array_col, myCol from lazy_array_map lateral view explode(array_col) X AS myCol) subq1
join
src a
on subq1.myCol = a.key;

select /*+ MAPJOIN(subq1) */ * from
(SELECT array_col, myCol from lazy_array_map lateral view explode(array_col) X AS myCol) subq1
join
src a
on subq1.myCol = a.key;


The last 2 queries should throw an error, but they work fine right now.
The same affect can be achieved without a mapjoin hint.

    
> lateral view followed by mapjoin should not be allowed
> ------------------------------------------------------
>
>                 Key: HIVE-3988
>                 URL: https://issues.apache.org/jira/browse/HIVE-3988
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>
> Consider the following queries:
> drop table lazy_array_map;
> create table lazy_array_map (map_col map<int,string>, array_col array <string>
);
> INSERT OVERWRITE TABLE lazy_array_map select map(1,'one',2,'two',3,'three'), array('100','200','300')
FROM src LIMIT 1;
> select /*+ MAPJOIN(a) */ * from
> (SELECT array_col, myCol from lazy_array_map lateral view explode(array_col) X AS myCol)
subq1
> join
> src a
> on subq1.myCol = a.key;
> select /*+ MAPJOIN(subq1) */ * from
> (SELECT array_col, myCol from lazy_array_map lateral view explode(array_col) X AS myCol)
subq1
> join
> src a
> on subq1.myCol = a.key;
> The last 2 queries should throw an error, but they work fine right now.
> The same affect can be achieved without a mapjoin hint.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message