abstractdog commented on code in PR #2921:
URL: https://github.com/apache/hive/pull/2921#discussion_r1332854331
##########
ql/src/test/queries/clientpositive/union_flatten_subdir.q:
##########
@@ -0,0 +1,19 @@
+set hive.tez.union.flatten.subdirectories=true;
+
+create external table union_src1 (value string) partitioned by (key int);
+create external table union_src2 (value string) partitioned by (key int);
+create external table union_target (value string) partitioned by (key int);
+
+insert into table union_src1 partition (key = 1) values ("val1");
+insert into table union_src1 partition (key = 2) values ("val2");
+
+insert into table union_src2 partition (key = 1) values ("val3");
+insert into table union_src2 partition (key = 3) values ("val4");
+
+insert into table union_target
+select value, key from union_src1
+union all
+select value, key from union_src2;
+
+-- if there is any HIVE_UNION_SUBDIR, the output will have more rows
+dfs -ls -R ${hiveconf:hive.metastore.warehouse.dir}/union_target;
Review Comment:
this test should be extended to certain scenarios:
1. acid/mm/non-acid
2. direct insert on/off
3. union flattening on/off
create different tables for different scenarios:
union_target_acid_directinsert_flattened
union_target_mm_directinsert_flattened
union_target_nonacid_directinsert_flattened
union_target_acid_nodirectinsert_flattened
union_target_mm_nodirectinsert_flattened
union_target_nonacid_nodirectinsert_flattened
union_target_acid_directinsert_noflattened
union_target_mm_directinsert_noflattened
union_target_nonacid_directinsert_noflattened
union_target_acid_nodirectinsert_noflattened
union_target_mm_nodirectinsert_noflattened
union_target_nonacid_nodirectinsert_noflattened
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]