Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
According to the API document for ST_RemovePoint, the second parameter can be omitted.
Introduction: RETURN Line with removed point at given index, position can be omitted and then last one will be removed.
Format: ST_RemovePoint(geom: geometry, position: integer)
Format: ST_RemovePoint(geom: geometry)
But it actually fails if the second parameter isn't specified.
$ spark-shell --packages org.apache.sedona:sedona-python-adapter-3.0_2.12:1.2.1-incubating-SNAPSHOT,org.datasyslab:geotools-wrapper:1.1.0-25.2 ... scala> import org.apache.sedona.sql.utils.SedonaSQLRegistrator import org.apache.sedona.sql.utils.SedonaSQLRegistrator scala> SedonaSQLRegistrator.registerAll(spark) scala> spark.sql("SELECT ST_RemovePoint(ST_GeomFromWKT('LINESTRING (0 0, 1 1, 2 2)'))").show() java.lang.AssertionError: assertion failed at scala.Predef$.assert(Predef.scala:208) at org.apache.spark.sql.sedona_sql.expressions.ST_RemovePoint.<init>(Functions.scala:1253) ...
Attachments
Issue Links
- links to