chinnaraolalam commented on code in PR #4664: URL: https://github.com/apache/hive/pull/4664#discussion_r1393580292
########## ql/src/test/queries/clientpositive/complex_datatype.q: ########## @@ -0,0 +1,203 @@ +set hive.default.fileformat=TEXTFILE; +set hive.fetch.task.conversion=none; +set hive.llap.io.enabled=false; +set hive.vectorized.execution.enabled=true; + +create EXTERNAL table `complex_map_array_table` as +select +'bob' as name, + MAP( + "Key1", + ARRAY( + 1, + 2, + 3 + ), + "Key2", + ARRAY( + 4, + 5, + 6 + ) + ) as column2; + +create EXTERNAL table `complex_map_struct_table` as +select +'bob' as name, +MAP( + "Map_Key1", + named_struct( + 'Id', + 'Id_Value1', + 'Name', + 'Name_Value1' + ), + "Map_Key2", + named_struct( + 'Id', + 'Id_Value2', + 'Name', + 'Name_Value2' + ) + ) as column2; + + +create EXTERNAL table `complex_table1` as +select +MAP( + "Key1", + ARRAY( + 1, + 2, + 3 + ), + "Key2", + ARRAY( + 4, + 5, + 6 + ) + ) as column1, +'bob' as name, +MAP( + "Map_Key1", + named_struct( + 'Id', + 'Id_Value1', + 'Name', + 'Name_Value1' + ), + "Map_Key2", + named_struct( + 'Id', + 'Id_Value2', + 'Name', + 'Name_Value2' + ) + ) as column3; + +create EXTERNAL table `complex_table2` as +select +MAP( + "Key1", + ARRAY( + 1, + 2, + 3 + ), + "Key2", + ARRAY( + 4, + 5, + 6 + ) + ) as column1, +MAP( + "Map_Key1", + named_struct( + 'Id', + 'Id_Value1', + 'Name', + 'Name_Value1' + ), + "Map_Key2", + named_struct( + 'Id', + 'Id_Value2', + 'Name', + 'Name_Value2' + ) + ) as column2; + +create EXTERNAL table `complex_table3` as +select +MAP( + "Key1", + ARRAY( + 1, + 2, + 3 + ), + "Key2", + ARRAY( + 4, + 5, + 6 + ) + ) as column1, +MAP( + "Key3", + ARRAY( + 7, + 8, + 9 + ), + "Key4", + ARRAY( + 10, + 11, + 12 + ) + ) as column2; + +-- The below scenario's was working before fix +create EXTERNAL table `complex_array_map_table` as +select +'bob' as name, +ARRAY( + MAP( + "Key1", + "Value1" + ), + MAP( + "Key2", + "Value2" + ) + ) as column2; + +create EXTERNAL table `complex_map_map_table` as +select + 'bob' as name, + MAP( + "Key1", + MAP( + 1, + 2 + ), + "Key2", + MAP( + 3, + 4 + ) + ) as column2; + +-- with vectorization set as "true" Review Comment: add one more test case which covers all complex types in on table, like table contains columns LIST,STRING,MAP<ARRAY>,STRUCT,MAP -- 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. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org