You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "james-willis (via GitHub)" <gi...@apache.org> on 2026/08/13 21:58:45 UTC

[PR] feat(rust/sedona-functions): add Sedona Spark alias names for st_force2d and st_force3d [sedona-db]

james-willis opened a new pull request, #1162:
URL: https://github.com/apache/sedona-db/pull/1162

   ## What changes were proposed in this PR?
   
   Register the alias names that Sedona Spark exposes for the force-dimension functions:
   
   - `st_force_2d` — Sedona Spark registers `ST_Force_2D` as a (legacy) name alongside `ST_Force2D` ([Catalog.scala](https://github.com/apache/sedona/blob/master/spark/common/src/main/scala/org/apache/sedona/sql/UDF/Catalog.scala))
   - `st_force3dz` — Sedona Spark registers `ST_Force3DZ` as an alias of `ST_Force3D`
   
   This follows the existing alias pattern used by `st_geomfromwkt` (`st_geomfromtext`, `st_geometryfromtext`, ...).
   
   ## Why are the changes needed?
   
   Spark SQL written against Sedona (e.g. pipelines using `ST_Force_2D`) currently fails with an unknown-function error when run on sedona-db. Alias parity makes such SQL portable unchanged.
   
   ## How was this patch tested?
   
   Extended the existing `udf_metadata` test in `st_force_dim.rs` to assert both aliases; `cargo test -p sedona-functions st_force_dim` passes.
   
   ## Did this PR include necessary documentation updates?
   
   No documentation change needed — aliases resolve to the documented functions.


-- 
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: [PR] feat(rust/sedona-functions): add Sedona Spark alias names for st_force2d and st_force3d [sedona-db]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #1162:
URL: https://github.com/apache/sedona-db/pull/1162#issuecomment-5299994790

   > Should I modify this PR to only add ST_Force3DZ
   
   That would be great...I didn't catch this when it was added, but for this kind of thing I also don't mind not porting older PostGIS functions with newer recommended behaviour. PostGIS and Sedona Spark are both useful guides with a longer user base to draw on than we have here (and make CI/review easier because of the parity check), I'm just trying to avoid porting unintentional behaviour from either while we're taking the time to review and test it all.


-- 
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: [PR] feat(rust/sedona-functions): add Sedona Spark alias names for st_force2d and st_force3d [sedona-db]

Posted by "james-willis (via GitHub)" <gi...@apache.org>.
james-willis commented on PR #1162:
URL: https://github.com/apache/sedona-db/pull/1162#issuecomment-5296487292

   Opened apache/sedona#3264 taking the deprecation route suggested here: both aliases now warn toward the canonical names on the Spark surface (one-time runtime warning for SQL users, `@deprecated` on the Scala DataFrame API, `DeprecationWarning` in Python, docs marked), with behavior unchanged.
   
   One nuance flagged on that PR: `ST_Force3DZ` is actually the canonical name in current PostGIS (`ST_Force3D` is its alias there), unlike `ST_Force_2D` which PostGIS itself deprecated in 2.1. So the `ST_Force3DZ` half trades PostGIS name-compatibility for a single canonical name — open to dropping that half if PostGIS parity is preferred.


-- 
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: [PR] feat(rust/sedona-functions): add the Sedona Spark ST_Force3DZ alias for st_force3d [sedona-db]

Posted by "james-willis (via GitHub)" <gi...@apache.org>.
james-willis commented on PR #1162:
URL: https://github.com/apache/sedona-db/pull/1162#issuecomment-5334895505

   Done — `st_force_2d` is dropped from this PR; only the `st_force3dz` alias remains (in both the code and the SQL reference page, keeping the docs check green). The branch is also rebased onto main. The Sedona-side deprecation of `ST_Force_2D` is up at apache/sedona#3264, now scoped to that name only since `ST_Force3DZ` is canonical PostGIS.


-- 
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: [PR] feat(rust/sedona-functions): add the Sedona Spark ST_Force3DZ alias for st_force3d [sedona-db]

Posted by "james-willis (via GitHub)" <gi...@apache.org>.
james-willis merged PR #1162:
URL: https://github.com/apache/sedona-db/pull/1162


-- 
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: [PR] feat(rust/sedona-functions): add Sedona Spark alias names for st_force2d and st_force3d [sedona-db]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #1162:
URL: https://github.com/apache/sedona-db/pull/1162#issuecomment-5288971065

   One could deprecate them with a warning giving the canonical name of the function. Either way I don't think we need typo-for-typo level parity.


-- 
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: [PR] feat(rust/sedona-functions): add Sedona Spark alias names for st_force2d and st_force3d [sedona-db]

Posted by "james-willis (via GitHub)" <gi...@apache.org>.
james-willis commented on PR #1162:
URL: https://github.com/apache/sedona-db/pull/1162#issuecomment-5287222006

   I found these issues when reviewing a real production sedona application and trying to run it in sedonadb. 
   
   So I would say not to remove them from sedona spark


-- 
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: [PR] feat(rust/sedona-functions): add Sedona Spark alias names for st_force2d and st_force3d [sedona-db]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #1162:
URL: https://github.com/apache/sedona-db/pull/1162#issuecomment-5286926173

   Should we remove the aliases from Sedona since they are possibly a typo? (This function doesn't exist anywhere else)


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