diff --git a/xtable-core/src/test/java/org/apache/xtable/TestSparkDeltaTable.java b/xtable-core/src/test/java/org/apache/xtable/TestSparkDeltaTable.java index a458070b..ee5b1ccd 100644 --- a/xtable-core/src/test/java/org/apache/xtable/TestSparkDeltaTable.java +++ b/xtable-core/src/test/java/org/apache/xtable/TestSparkDeltaTable.java @@ -134,7 +134,15 @@ public void upsertRows(List upsertRows) { } @SneakyThrows + @Override public void deleteRows(List deleteRows) { + String idsToDelete = + deleteRows.stream().map(row -> row.get(0).toString()).collect(Collectors.joining(", ")); + deltaTable.delete("id in (" + idsToDelete + ")"); + } + + @SneakyThrows + public void mergeDeleteRows(List deleteRows) { List deletes = testDeltaHelper.transformForUpsertsOrDeletes(deleteRows, false); Dataset deleteDataset = sparkSession.createDataFrame(deletes, testDeltaHelper.getTableStructSchema());