iGN5117 commented on code in PR #853:
URL: https://github.com/apache/sedona/pull/853#discussion_r1223521984


##########
docs/api/sql/Function.md:
##########
@@ -1668,3 +1668,17 @@ SELECT ST_ZMin(ST_GeomFromText('LINESTRING(1 3 4, 5 6 
7)'))
 
 Output: `4.0`
 
+## ST_NumPoints

Review Comment:
   Updated documentation and corrected order



##########
docs/api/flink/Function.md:
##########
@@ -1035,3 +1035,18 @@ SELECT ST_ZMin(ST_GeomFromText('LINESTRING(1 3 4, 5 6 
7)'))
 ```
 
 Output: `4.0`
+
+## ST_NumPoints

Review Comment:
   Updated documentation and corrected order



##########
common/src/main/java/org/apache/sedona/common/Functions.java:
##########
@@ -845,6 +845,14 @@ private static Coordinate[] extractCoordinates(Geometry 
geometry) {
         return coordinates;
     }
 
+    public static int numPoints(Geometry geometry) throws Exception {
+        String geometryType = geometry.getGeometryType();
+        if (!(Geometry.TYPENAME_LINESTRING.equalsIgnoreCase(geometryType))) {
+            throw new Exception("Unsupported geometry type: " + geometryType);

Review Comment:
   Done



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

Reply via email to