feat(rust/sedona-functions): Add ST_GeomFromEWKB and support item crs inputs to ST_SetSRID#547
Merged
paleolimbot merged 5 commits intoapache:mainfrom Jan 30, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for reading EWKB (Extended Well-Known Binary) geometries, which include CRS information, and fixes ST_SetSRID to properly handle item_crs inputs for complete roundtrip testing.
Changes:
- Added ST_GeomFromEWKB function to construct geometries with CRS from EWKB format
- Updated ST_SetSRID and ST_SetCRS to support item_crs inputs by using parse_item_crs_arg helper functions
- Enhanced test coverage with roundtrip EWKB tests and parameterized tests for item_crs inputs
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rust/sedona-functions/src/st_geomfromewkb.rs | New file implementing ST_GeomFromEWKB function to parse EWKB and extract CRS information |
| rust/sedona-functions/src/st_setsrid.rs | Updated to support item_crs inputs, refactored return type logic, and changed SRID validation from numeric to integer |
| rust/sedona-functions/src/register.rs | Registered new ST_GeomFromEWKB function and reordered function list alphabetically |
| rust/sedona-functions/src/lib.rs | Added module declaration for st_geomfromewkb |
| rust/sedona-expr/src/item_crs.rs | Made helper functions public to support item_crs parsing in other modules |
| python/sedonadb/tests/functions/test_wkb.py | Enhanced EWKB tests with roundtrip validation and updated test parameters |
| python/sedonadb/python/sedonadb/testing.py | Added val_or_null helper method to format binary values as SQL literals for different engines |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zhangfengcdt
approved these changes
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the function ST_GeomFromEWKB (which constructs an item_crs, as opposed to ST_GeomFromWKB, which constructs a regular geometry).
In the process of completing the roundtrip testing I also realized that ST_SetSRID didn't support item CRS inputs, so I just fixed that so I could complete the roundtrip test.
Closes #489
Closes #490