Andre9580 commented on code in PR #4630:
URL: https://github.com/apache/iceberg/pull/4630#discussion_r858149761
##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/source/SparkTable.java:
##########
@@ -295,7 +295,7 @@ public void deleteWhere(Filter[] filters) {
.deleteFromRowFilter(deleteExpr)
.commit();
} catch (ValidationException e) {
- throw new IllegalArgumentException("Failed to cleanly delete data files
matching: " + deleteExpr, e);
+ throw new ValidationException(e, "Failed to cleanly delete data files
matching: %s", deleteExpr);
Review Comment:
@szehon-ho just to confirm you want the `ValidationException` directly
thrown by the method `deleteWhere`?
Like this:
```
@Override
public void deleteWhere(Filter[] filters) throws ValidationException {
Expression deleteExpr = SparkFilters.convert(filters);
if (deleteExpr == Expressions.alwaysFalse()) {
LOG.info("Skipping the delete operation as the condition is always
false");
return;
}
icebergTable.newDelete()
.set("spark.app.id",
sparkSession().sparkContext().applicationId())
.deleteFromRowFilter(deleteExpr)
.commit();
}
```
--
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]