rdblue commented on a change in pull request #1772:
URL: https://github.com/apache/iceberg/pull/1772#discussion_r524499188



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/source/SparkTable.java
##########
@@ -159,6 +164,11 @@ public WriteBuilder newWriteBuilder(LogicalWriteInfo info) 
{
   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;
+    }

Review comment:
       I agree with both of you. Normally, I'd prefer if/else to an extra 
return. But in this case it is better to return because we don't want to touch 
all of the lines that actually perform the delete.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to