Skip to content

Commit

Permalink
Remove un-needed changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vinishjail97 committed Dec 27, 2024
1 parent d009bac commit 2fe117f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,15 @@ public void upsertRows(List<Row> upsertRows) {
}

@SneakyThrows
@Override
public void deleteRows(List<Row> deleteRows) {
String idsToDelete =
deleteRows.stream().map(row -> row.get(0).toString()).collect(Collectors.joining(", "));
deltaTable.delete("id in (" + idsToDelete + ")");
}

@SneakyThrows
public void mergeDeleteRows(List<Row> deleteRows) {
List<Row> deletes = testDeltaHelper.transformForUpsertsOrDeletes(deleteRows, false);
Dataset<Row> deleteDataset =
sparkSession.createDataFrame(deletes, testDeltaHelper.getTableStructSchema());
Expand Down

0 comments on commit 2fe117f

Please sign in to comment.