kbendick commented on a change in pull request #2062:
URL: https://github.com/apache/iceberg/pull/2062#discussion_r567386194
##########
File path: api/src/main/java/org/apache/iceberg/transforms/Truncate.java
##########
@@ -303,11 +303,15 @@ public boolean satisfiesOrderOf(Transform<?, ?> other) {
return Expressions.predicate(predicate.op(), name);
} else if (predicate instanceof BoundLiteralPredicate) {
BoundLiteralPredicate<CharSequence> pred =
predicate.asLiteralPredicate();
- if (pred.op() == Expression.Operation.STARTS_WITH) {
+ if (isStringPrefixPredicate(pred)) {
if (pred.literal().value().length() < width()) {
Review comment:
Cool. That's much cleaner. And I see now how/why the starts with case
can't make as many strict guarantees due to truncation. Thank you both. I will
update this.
----------------------------------------------------------------
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]