pvary commented on code in PR #3131:
URL: https://github.com/apache/hive/pull/3131#discussion_r843552057


##########
iceberg/iceberg-handler/src/test/queries/positive/delete_iceberg_partitioned_avro.q:
##########
@@ -0,0 +1,26 @@
+set hive.vectorized.execution.enabled=false;
+set hive.support.concurrency=true;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+
+drop table if exists tbl_ice;
+create external table tbl_ice(a int, b string, c int) partitioned by spec 
(bucket(16, a), truncate(3, b)) stored by iceberg stored as avro tblproperties 
('format-version'='2');
+
+-- delete using simple predicates
+insert into tbl_ice values (1, 'one', 50), (2, 'two', 51), (3, 'three', 52), 
(4, 'four', 53), (5, 'five', 54), (111, 'one', 55), (333, 'two', 56);
+delete from tbl_ice where b in ('one', 'four') or a = 22;
+select * from tbl_ice order by a;
+-- (2, 'two', 51), (3, 'three', 52),  (5, 'five', 54), (333, 'two', 56)
+
+-- delete using subqueries referencing the same table
+insert into tbl_ice values (444, 'hola', 800), (555, 'schola', 801);
+delete from tbl_ice where a in (select a from tbl_ice where a <= 5) or c in 
(select c from tbl_ice where c > 800);
+select * from tbl_ice order by a;
+-- (333, 'two', 56), (444, 'hola', 800)
+
+-- delete using a join subquery between the same table & another table
+drop table if exists tbl_ice_other;
+create external table tbl_ice_other(a int, b string) stored by iceberg;

Review Comment:
   Would it be worth to create a non-Iceberg table, delete using values from it?



-- 
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]

Reply via email to