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 2026/03/09 19:10:24 UTC
[I] rust/sedona: Ensure struct/map/list extract works in Sedona SQL [sedona-db]
paleolimbot opened a new issue, #701:
URL: https://github.com/apache/sedona-db/issues/701
In the Overture schemas there are quite a few structs and maps (e.g., divisions.names.common); however, we can't easily extract or query on the map elements:
```python
import sedona.db
sd = sedona.db.connect()
overture = "s3://overturemaps-us-west-2/release/2026-02-18.0"
options = {"aws.skip_signature": True, "aws.region": "us-west-2"}
sd.read_parquet(f"{overture}/theme=places/type=place/", options=options).to_view(
"places"
)
sd.read_parquet(
f"{overture}/theme=divisions/type=division_area/", options=options
).to_view("divisions")
sd.sql("SELECT names.common['en'] FROM divisions WHERE names.common['en'] IS NOT NULL").show()
#> SedonaError: GetFieldAccess not supported by ExprPlanner: RawFieldAccessExpr { field_access: NamedStructField { name: Utf8("en") }, expr: ScalarFunction(ScalarFunction { func: ScalarUDF { inner: GetFieldFunc { signature: Signature { type_signature: Any(2), volatility: Immutable, parameter_names: None } } }, args: [Column(Column { relation: Some(Bare { table: "divisions" }), name: "names" }), Literal(Utf8("common"), None)] }) }
# Here, names.common is a map type
sd.sql("SELECT names.common FROM divisions").schema
#> SedonaSchema with 1 field:
#> divisions.names[common]: map<Map("key_value": non-null Struct("key": non-null Utf8, "value": Utf8), unsorted)>
```
This works in DuckDB
```python
import duckdb
overture = "s3://overturemaps-us-west-2/release/2026-02-18.0"
duckdb.read_parquet(
f"{overture}/theme=divisions/type=division_area/*"
).to_view("divisions")
duckdb.sql("SELECT names.common['en'] FROM divisions WHERE names.common['en'] IS NOT NULL").show()
#> ┌──────────────────────────────────────────┐
#> │ "names".common['en'] │
#> │ varchar │
#> ├──────────────────────────────────────────┤
#> │ South Georgia And South Sandwich Islands │
#> │ South Georgia And South Sandwich Islands │
#> │ South Sandwich Islands │
#> │ South Sandwich Islands │
#> │ South Georgia │
#> │ South Georgia │
#> │ Bird Island │
#> │ Escalante Department │
#> │ Puerto Deseado │
#> │ Stanley │
#> │ · │
#> │ · │
#> │ · │
#> │ Muingacree │
#> │ Forkeala │
#> │ Gleno │
#> │ Toorlougher │
#> │ Meentolla │
#> │ Glenstal │
#> │ Moher │
#> │ Ballyvorheen │
#> │ Kilduffahoo │
#> │ Buffanoky │
#> └──────────────────────────────────────────┘
#> ? rows (>9999 rows, 20 shown)
```
--
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] rust/sedona: Ensure struct/map/list extract works in Sedona SQL [sedona-db]
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot closed issue #701: rust/sedona: Ensure struct/map/list extract works in Sedona SQL
URL: https://github.com/apache/sedona-db/issues/701
--
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