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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]