kasakrisz commented on code in PR #6310:
URL: https://github.com/apache/hive/pull/6310#discussion_r2910685078
##########
iceberg/iceberg-handler/src/test/queries/positive/iceberg_multi_table_txn.q:
##########
@@ -0,0 +1,35 @@
+-- SORT_QUERY_RESULTS
+
+set hive.support.concurrency=true;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+
+drop table if exists iceberg_txn_t1;
+drop table if exists iceberg_txn_t2;
+
+create external table iceberg_txn_t1(a int) stored by iceberg
+tblproperties ('format-version'='2');
+
+create external table iceberg_txn_t2(a int) stored by iceberg
+tblproperties ('format-version'='2');
+
+from (
+ select 1 as a union all select 2
+) s
+insert into iceberg_txn_t1
+ select a
+insert into iceberg_txn_t2
+ select a + 10;
+
+select * from iceberg_txn_t1 order by a;
+select * from iceberg_txn_t2 order by a;
+
+start transaction;
+insert into iceberg_txn_t1 values (3);
+update iceberg_txn_t2 set a = a + 1;
+commit;
+
Review Comment:
Could you please add more test. Example:
1. More than one statement affects the same table in the same txn
```
start transaction;
insert into iceberg_txn_t1 values (3);
update iceberg_txn_t1 set a = a + 1;
commit;
```
2. Select from the table was affected before and after the `commit`
stamenent;
```
start transaction;
insert into iceberg_txn_t1 values (3);
update iceberg_txn_t1 set a = a + 1;
commit;
```
--
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]