yutannihilation commented on code in PR #498:
URL: https://github.com/apache/sedona-db/pull/498#discussion_r2678206722


##########
python/sedonadb/tests/functions/test_functions.py:
##########
@@ -1296,6 +1296,30 @@ def test_st_geomfromtext_with_srid(eng, wkt, srid, 
expected):
     )
 
 
[email protected]("eng", [SedonaDB, PostGIS])
[email protected](
+    ("ewkt", "expected", "expected_srid"),
+    [
+        ("SRID=4326;POINT (0 0)", "POINT (0 0)", 4326),
+        ("SRID=3857;POINT (0 0)", "POINT (0 0)", 3857),
+        ("SRID=0;POINT (0 0)", "POINT (0 0)", 0),
+    ],
+)
+def test_st_geomfromewkt(eng, ewkt, expected, expected_srid):
+    if ewkt is not None:
+        ewkt = f"'{ewkt}'"
+    eng = eng.create_or_skip()
+    # TODO: currently, a per-item-CRS geometry cannot be cast to string
+    # eng.assert_query_result(
+    #     f"SELECT ST_GeomFromEWKT({val_or_null(ewkt)})",
+    #     expected,
+    # )

Review Comment:
   Fair enough! Then, I remove this for now as `ST_AsWKT()` doesn't work either.



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