aokolnychyi commented on code in PR #8466:
URL: https://github.com/apache/iceberg/pull/8466#discussion_r1313706518
##########
spark/v3.4/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestDelete.java:
##########
@@ -117,6 +117,36 @@ public void removeTables() {
sql("DROP TABLE IF EXISTS parquet_table");
}
+ @Test
+ public void testDeleteWithVectorizedReads() throws NoSuchTableException {
+ assumeThat(supportsVectorization()).isTrue();
+
+ createAndInitPartitionedTable();
+
+ append(tableName, new Employee(1, "hr"), new Employee(2, "hr"));
+ append(tableName, new Employee(3, "hardware"), new Employee(4,
"hardware"));
+
+ createBranchIfNeeded();
+
+ SparkPlan plan = executeAndKeepPlan("DELETE FROM %s WHERE id = 2",
commitTarget());
+ assertAllBatchScansVectorized(plan);
+
+ Table table = validationCatalog.loadTable(tableIdent);
+ Assert.assertEquals("Should have 3 snapshots", 3,
Iterables.size(table.snapshots()));
+
+ Snapshot currentSnapshot = SnapshotUtil.latestSnapshot(table, branch);
+ if (mode(table) == COPY_ON_WRITE) {
Review Comment:
The `mode` method is used in a lot of places and it is a bit more reliable
cause it checks the table. I used it here so that tests are consistent. We may
reconsider that in a follow-up but I don't think it is a big deal.
--
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]