Andre9580 commented on issue #4356:
URL: https://github.com/apache/iceberg/issues/4356#issuecomment-1107915355
Hi @szehon-ho, are you suggesting to update the code this way?
```
@Override
public void deleteWhere(Filter[] filters) {
Expression deleteExpr = SparkFilters.convert(filters);
if (deleteExpr == Expressions.alwaysFalse()) {
LOG.info("Skipping the delete operation as the condition is always
false");
return;
}
try {
icebergTable.newDelete()
.set("spark.app.id", sparkSession().sparkContext().applicationId())
.deleteFromRowFilter(deleteExpr)
.commit();
} catch (ValidationException e) {
throw new ValidationException(e, "Failed to cleanly delete data files
matching: %s", deleteExpr);
}
}
```
--
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]