You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "jiayuasu (via GitHub)" <gi...@apache.org> on 2026/09/21 05:25:41 UTC
Re: [PR] fix(rust/sedona-schema): accept LargeBinary WKB storage [sedona-db]
jiayuasu commented on code in PR #1318:
URL: https://github.com/apache/sedona-db/pull/1318#discussion_r4059464836
##########
rust/sedona-schema/src/datatypes.rs:
##########
@@ -388,9 +425,10 @@ fn display_geometry(
fn sedona_type_wkb(edges: Edges, crs: Crs, storage_type: DataType) -> Result<SedonaType> {
match storage_type {
DataType::Binary => Ok(SedonaType::Wkb(edges, crs)),
+ DataType::LargeBinary => Ok(SedonaType::WkbLarge(edges, crs)),
Review Comment:
Could you also add `WkbLarge` to the `edge_type` getter in `python/sedonadb/src/schema.rs`? It only matches `Wkb` and `WkbView`, so LargeBinary geography returns `None`.
Example with the Python package built from this branch:
```python
import geoarrow.pyarrow as ga
import pyarrow as pa
import sedonadb
from shapely.geometry import Point
ty = ga.large_wkb().with_edge_type(ga.EdgeType.SPHERICAL).with_crs("OGC:CRS84")
geom = pa.array([Point(1, 2).wkb], type=ty)
df = sedonadb.connect().create_data_frame(pa.table({"geom": geom}))
print(df.schema.field("geom").type.edge_type) # None
```
This should be `EdgeType.SPHERICAL`, as it is when using `ga.wkb()`. I confirmed the getter result by compiling this branch's Python schema binding.
GeoPandas also reads this property in `_scalar_expr()` to preserve geography on assignment. With `None` here, replacing the column with a Shapely geometry or a null takes the planar branch instead.
--
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