You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/11/16 18:30:08 UTC
[GitHub] [iceberg] aokolnychyi commented on a change in pull request #1772: Spark: Skip DELETE if the condition is false
aokolnychyi commented on a change in pull request #1772:
URL: https://github.com/apache/iceberg/pull/1772#discussion_r524484462
##########
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:
Just trying to touch fewer lines and avoid extra indentation for the block below.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org