umartin commented on code in PR #647:
URL: https://github.com/apache/incubator-sedona/pull/647#discussion_r923308073
##########
common/src/main/java/org/apache/sedona/Functions.java:
##########
@@ -0,0 +1,28 @@
+package org.apache.sedona;
+
+import org.locationtech.jts.geom.Coordinate;
+import org.locationtech.jts.geom.Geometry;
+
+public class Functions {
+ public static double ST_Distance(Geometry left, Geometry right) {
Review Comment:
Should functions in common do null checks or should that be done in the
Spark and Flink bindings? I don't have a strong opinion but clarifying the
contract for functions in common would be helpful for contributors.
Making functions in common null safe would be safer but each platform
(currently Spark and Flink) has its own way of doing input validation so the
null check might have to be repeated there. In Spark that is done by overriding
checkInputDataTypes in expressions. It's currently not done in Sedona but would
be a nice to add in the future. It would make error messages a lot more user
friendly.
--
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]