You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2025/04/18 21:26:28 UTC
[I] ST_X/Y on POINT EMPTY throws exception [sedona]
paleolimbot opened a new issue, #1922:
URL: https://github.com/apache/sedona/issues/1922
I believe this should return a NULL (at least it does on PostGIS):
```python
from sedona.spark import SedonaContext
config = SedonaContext.builder().getOrCreate()
sedona = SedonaContext.create(config)
sedona.sql("SELECT ST_X(ST_GeomFromText('POINT EMPTY'))").show()
#> ERROR ExecutionListenerBus: Listener SqlListener threw an exception
#> org.apache.spark.sql.sedona_sql.expressions.InferredExpressionException: Exception occurred while evaluating expression ST_X - inputs: [POINT EMPTY], cause: Cannot read field "x" because the return value of "org.locationtech.jts.geom.Geometry.getCoordinate()" is null
```
On PostGIS:
```shell
# docker run --rm -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=password -p "5432:5432" postgis/postgis
# psql -h 127.0.0.1 --user postgres
postgres=# SELECT ST_X(ST_GeomFromText('POINT EMPTY')) IS NULL;
```
--
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: issues-unsubscribe@sedona.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] ST_X/Y on POINT EMPTY throws exception [sedona]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu closed issue #1922: ST_X/Y on POINT EMPTY throws exception
URL: https://github.com/apache/sedona/issues/1922
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] ST_X/Y on POINT EMPTY throws exception [sedona]
Posted by "jgoday (via GitHub)" <gi...@apache.org>.
jgoday commented on issue #1922:
URL: https://github.com/apache/sedona/issues/1922#issuecomment-2819338467
@paleolimbot @jiayuasu
I'd like to try implementing the following PR related to this issue.
Please, feel free to delete it if you consider it incorrect or misguided.
Thanks!
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org