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 2021/01/11 15:40:14 UTC

[GitHub] [iceberg] RussellSpitzer commented on a change in pull request #2062: [CORE] Add in a NOT_STARTS_WITH operator with filter pushdown

RussellSpitzer commented on a change in pull request #2062:
URL: https://github.com/apache/iceberg/pull/2062#discussion_r555135021



##########
File path: api/src/main/java/org/apache/iceberg/expressions/BoundLiteralPredicate.java
##########
@@ -69,6 +69,8 @@ public boolean test(T value) {
         return cmp.compare(value, literal.value()) != 0;
       case STARTS_WITH:
         return String.valueOf(value).startsWith((String) literal.value());
+      case NOT_STARTS_WITH:
+        return !String.valueOf(value).startsWith((String) literal.value());

Review comment:
       I think alignment with the previous code is find. I would be worried about any changes to past matching behavior and I think one of the concerns here is that there are multiple groups of bytes which may represent the same string so you can't just compare the binary values I think....




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