LakshmiSowmya04 commented on code in PR #409:
URL: https://github.com/apache/sedona-db/pull/409#discussion_r2608988280


##########
python/sedonadb/tests/functions/test_functions.py:
##########
@@ -2935,3 +2929,32 @@ def test_st_NRings(eng, geom, expected):
         f"SELECT ST_NRings({geom_or_null(geom)})",
         expected,
     )
+
+
[email protected]("eng", [SedonaDB, PostGIS])
[email protected](
+    ("geom", "expected"),
+    [
+        (None, None),
+        ("POINT (1 2)", None),
+        ("LINESTRING (0 0, 1 1, 2 2)", None),
+        ("MULTILINESTRING ((0 0, 1 1), (2 2, 3 3))", None),
+        ("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))", "LINESTRING (0 0, 1 0, 1 1, 0 
1, 0 0)"),
+        (
+            "POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0), (1 1, 1 2, 2 2, 2 1, 1 
1))",
+            "LINESTRING (0 0, 10 0, 10 10, 0 10, 0 0)",
+        ),
+        (
+            "MULTIPOLYGON (((0 0, 1 0, 1 1, 0 1, 0 0)), ((10 10, 20 10, 20 20, 
10 20, 10 10)))",
+            None,
+        ),
+        ("GEOMETRYCOLLECTION(POINT(1 1), POLYGON((0 0, 1 0, 1 1, 0 0)))", 
None),
+        (
+            "POLYGON Z ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1))",
+            "LINESTRING Z (0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)",

Review Comment:
   can I ask how you figured out we have to use the polygon M and polygon ZM 
cases for this? I cannot see it in the documentation.



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