jackye1995 commented on code in PR #7050:
URL: https://github.com/apache/iceberg/pull/7050#discussion_r1134380849
##########
spark/v3.3/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestDelete.java:
##########
@@ -1066,6 +1068,50 @@ public void testDeleteWithMultipleSpecs() {
sql("SELECT * FROM %s ORDER BY id", selectTarget()));
}
+ @Test
+ public void testDeleteToWAPBranch() throws NoSuchTableException {
+ Assume.assumeTrue("WAP branch only works for table identifier without
branch", branch == null);
+
+ createAndInitPartitionedTable();
+ sql(
+ "ALTER TABLE %s SET TBLPROPERTIES ('%s' = 'true')",
+ tableName, TableProperties.WRITE_AUDIT_PUBLISH_ENABLED);
+ append(new Employee(0, "hr"), new Employee(1, "hr"), new Employee(2,
"hr"));
+
+ try {
+ spark.conf().set(SparkSessionProperties.WAP_BRANCH, "wap");
+ sql("DELETE FROM %s t WHERE id=0", tableName);
+ Assert.assertEquals(
+ "Should have expected num of rows", 2L, spark.table(tableName +
".branch_wap").count());
Review Comment:
added
--
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]