Fokko commented on code in PR #13805:
URL: https://github.com/apache/iceberg/pull/13805#discussion_r2275742028


##########
api/src/main/java/org/apache/iceberg/expressions/UnboundPredicate.java:
##########
@@ -199,7 +199,9 @@ private Expression bindLiteralOperation(BoundTerm<T> 
boundTerm) {
       }
     }
 
-    // TODO: translate truncate(col) == value to startsWith(value)
+    if (op() == Operation.EQ && boundTerm instanceof BoundTransform) {
+      return new BoundLiteralPredicate<>(Operation.STARTS_WITH, boundTerm, 
lit);
+    }

Review Comment:
   I'm not sure what @rdblue's original intent was here, but I don't think this 
is correct. One important difference between eq and starts-with is that 
starts-with only works for variable-length types (string, binary, etc).



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

Reply via email to