RussellSpitzer commented on a change in pull request #2062:
URL: https://github.com/apache/iceberg/pull/2062#discussion_r770906869
##########
File path: api/src/main/java/org/apache/iceberg/transforms/Truncate.java
##########
@@ -285,7 +285,29 @@ public boolean satisfiesOrderOf(Transform<?, ?> other) {
if (predicate.isUnaryPredicate()) {
return Expressions.predicate(predicate.op(), name);
} else if (predicate.isLiteralPredicate()) {
- return ProjectionUtil.truncateArray(name,
predicate.asLiteralPredicate(), this);
+ BoundLiteralPredicate<CharSequence> pred =
predicate.asLiteralPredicate();
Review comment:
So if I understand this we have a set of optimizations here,
If we have a starts with:
If our prefix is shorter than the truncate:
Then behave has normal and compare with normal StartsWith
If our prefix is the same length as the truncate:
Then we can do an equal instead
If our prefix is longer than the truncate:
Truncate the literal and check that
If we have a notStartsWith:
If our prefix is shorter than the truncate:
Behave as normal with notStartsWith
If our prefix is the same length as truncate:
Compare with Equals
If our prefix is longer than the truncate:
No pruning possible because we don't have enough information
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]