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


##########
core/src/test/java/org/apache/iceberg/expressions/TestExpressionParser.java:
##########
@@ -544,4 +563,122 @@ public void testNegativeScaleDecimalLiteral() {
     assertThat(ExpressionParser.toJson(ExpressionParser.fromJson(expected), 
true))
         .isEqualTo(expected);
   }
+
+  @Test
+  public void testSpatialPredicate() {
+    String expected =
+        "{\n"
+            + "  \"type\" : \"st-intersects\",\n"

Review Comment:
   Should we add this to `rest-catalog-open-api.yaml`? I didn't see any 
geospatial expression there. 



##########
api/src/main/java/org/apache/iceberg/expressions/ExpressionUtil.java:
##########
@@ -579,6 +593,8 @@ private static String sanitize(Literal<?> literal, long 
now, int today) {
       return sanitizeNumber(((Literals.DoubleLiteral) literal).value(), 
"float");
     } else if (literal instanceof Literals.VariantLiteral) {
       return sanitizeVariant(((Literals.VariantLiteral) literal).value(), now, 
today);
+    } else if (literal instanceof BoundingBoxLiteral) {
+      return "(geospatial)";

Review Comment:
   Do we want to use `(boundingbox)`?



##########
api/src/main/java/org/apache/iceberg/expressions/ExpressionVisitors.java:
##########
@@ -318,7 +350,6 @@ public <T> R predicate(BoundPredicate<T> pred) {
                 "Invalid operation for BoundSetPredicate: " + pred.op());
         }
       }
-

Review Comment:
   Revert unnecessary change?



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