[ 
https://issues.apache.org/jira/browse/HIVE-24883?focusedWorklogId=590257&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-590257
 ]

ASF GitHub Bot logged work on HIVE-24883:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Apr/21 09:37
            Start Date: 28/Apr/21 09:37
    Worklog Time Spent: 10m 
      Work Description: zabetak commented on a change in pull request #2071:
URL: https://github.com/apache/hive/pull/2071#discussion_r621966988



##########
File path: ql/src/test/queries/clientnegative/test_merge_join_map_type.q
##########
@@ -0,0 +1,25 @@
+create table table_map_types (id int, c1 map<int,int>, c2 map<int,int>);
+insert into table_map_types VALUES (1, map(1,1), map(2,1));
+insert into table_map_types VALUES (2, map(1,2), map(2,2));
+insert into table_map_types VALUES (3, map(1,3), map(2,3));
+insert into table_map_types VALUES (4, map(1,4), map(1,4));
+insert into table_map_types VALUES (1, map(1,1,2,2,3,3,4,4), map(2,1,1,4));
+select * from table_map_types;
+
+create table table_map_types1 (id int, c1 map<int,int>, c2 map<int,int>);
+insert into table_map_types1 VALUES (1, map(1,1), map(2,1));
+insert into table_map_types1 VALUES (2, map(1,2), map(2,2));
+insert into table_map_types1 VALUES (3, map(1,4), map(1,3));
+insert into table_map_types1 VALUES (1, map(1,1,2,2,3,3,4,4), map(2,1,1,5));
+insert into table_map_types1 VALUES (1, map(1,1,2,2,3,3,4,5), map(2,1,1,4));
+select * from table_map_types1;
+
+set hive.cbo.enable=false;
+set hive.auto.convert.join=false;
+set hive.optimize.ppd=false;
+
+explain select * from table_map_types t1 inner join table_map_types1 t2 on 
t1.c1 = t2.c1;
+select * from table_map_types t1 inner join table_map_types1 t2 on t1.c1 = 
t2.c1;
+
+explain select * from table_map_types t1 inner join table_map_types1 t2 on 
t1.c2 = t2.c2;
+select * from table_map_types t1 inner join table_map_types1 t2 on t1.c2 = 
t2.c2;

Review comment:
       Since this is a negative test I guess you only need the following lines 
to make sure that the exception is raised:
   ```
   create table table_map_types (id int, c1 map<int,int>, c2 map<int,int>);
   set hive.cbo.enable=false;
   set hive.auto.convert.join=false;
   set hive.optimize.ppd=false;
   select * from table_map_types t1 inner join table_map_types t2 on t1.c1 = 
t2.c1;
   ```
   It is better to keep test cases minimal.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 590257)
    Time Spent: 3h  (was: 2h 50m)

> Add support for complex types columns in Hive Joins
> ---------------------------------------------------
>
>                 Key: HIVE-24883
>                 URL: https://issues.apache.org/jira/browse/HIVE-24883
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 4.0.0
>            Reporter: mahesh kumar behera
>            Assignee: mahesh kumar behera
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> Hive fails to execute joins on array type columns as the comparison functions 
> are not able to handle array type columns.   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to