abstractdog commented on code in PR #4730:
URL: https://github.com/apache/hive/pull/4730#discussion_r1332854539
##########
ql/src/test/queries/clientpositive/flatten_union_subdir.q:
##########
@@ -0,0 +1,17 @@
+set hive.tez.union.flatten.subdirectories=true;
+set hive.support.concurrency=true;
+set hive.exec.dynamic.partition.mode=nonstrict;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+set hive.acid.direct.insert.enabled=true;
+set hive.auto.convert.join=true;
+
+create table test1 (val string) partitioned by (dt string) stored as avro
TBLPROPERTIES ('transactional'='true',
'transactional_properties'='insert_only');
+insert into test1 partition (dt='20230817') values ("val1"), ("val2");
+create table test2 (val string) partitioned by (dt string) stored as avro
TBLPROPERTIES ('transactional'='true',
'transactional_properties'='insert_only');
+select ful.* from (select val from test2 where dt='20230816') ful left join
(select val from test1 where dt='20230817') inc on ful.val=inc.val;
+
+explain insert overwrite table test2 partition (dt='20230817') select ful.*
from (select val from test2 where dt='20230816') ful left join (select val from
test1 where dt='20230817') inc on ful.val=inc.val union all select test1.val
from test1 where dt='20230817';
+
+insert overwrite table test2 partition (dt='20230817') select ful.* from
(select val from test2 where dt='20230816') ful left join (select val from
test1 where dt='20230817') inc on ful.val=inc.val union all select test1.val
from test1 where dt='20230817';
Review Comment:
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]