bchapuis commented on code in PR #2962:
URL: https://github.com/apache/calcite/pull/2962#discussion_r1038610731


##########
core/src/main/java/org/apache/calcite/runtime/SpatialTypeFunctions.java:
##########
@@ -1318,6 +1322,195 @@ public static Geometry ST_Translate(Geometry geom, 
BigDecimal x, BigDecimal y) {
     return transformation.transform(geom);
   }
 
+  // Geometry measurement functions
+
+  /**
+   * Returns the area of the {@code geom}.
+   */
+  public static @Nullable Double ST_Area(Geometry geom) {
+    return geom.getArea();

Review Comment:
   This is a good point, I fixed these two methods. I started adding test cases 
for null values after realizing that they were supported by postgis. I will 
open an issue to ensure that we are consistent when it come to null values in 
the other methods.



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to