rdblue commented on code in PR #14101:
URL: https://github.com/apache/iceberg/pull/14101#discussion_r2830486715


##########
api/src/main/java/org/apache/iceberg/expressions/ExpressionVisitors.java:
##########
@@ -126,6 +127,16 @@ public <T> R notStartsWith(BoundReference<T> ref, 
Literal<T> lit) {
           "notStartsWith expression is not supported by the visitor");
     }
 
+    public <T> R stIntersects(BoundReference<T> ref, Literal<ByteBuffer> lit) {

Review Comment:
   I think that the right signature for this is 
`stIntersects(BoundReference<T>, BoundingBox)` or maybe with 
`BoundReference<ByteBuffer>`. The use of `T` in both `BoundReference` and 
`Literal` is because we want comparisons to be able to operate without 
requiring casting. That way, `ref.comparator()` is a `Comparator<T>` and both 
`ref.accessor().get(row)` and `lit.value()` are as well.
   
   This is correct that we don't need `T` to match, but it's awkward to get a 
`BoundReference<T>` and a concrete `Literal`. Since we are going to need to 
trust binding to geo types, we can update the visitor to pass the 
`BoundingBox`. I'm not sure that we want to wrap `BoundingBox` in `Literal`, 
but I'm learning toward doing that so we don't need to add a new type of 
`BoundPredicate` that doesn't have a `literal`.



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