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



##########
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:
       It's also tempting to just use the comparator from literal, like follows:
   
   ```java
   cmp.compare(value, literal.value()) == 0;
   ```
   
   However, because we're only interested in checking whether or not `value` 
does not start with the predicate's literal term, we would need to truncate 
like we do elsewhere so I don't think that the simple one line above would be 
correct (nice as it would be though).




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