paleolimbot opened a new pull request, #973:
URL: https://github.com/apache/sedona-db/pull/973
The main issue here is that we didn't build datafusion with the nested
expressions feature. This makes overture queries way nicer because they
otherwise require a lot of ugly functions (which we didn't even have because
they weren't compiled in with our feature set)
```python
import sedona.db
sd = sedona.db.connect()
overture = "s3://overturemaps-us-west-2/release/2026-05-20.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(3)
# ┌─────────────────────────────┐
# │ divisions.names[common][en] │
# │ utf8 │
# ╞═════════════════════════════╡
# │ Chapecó │
# ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
# │ Santa Catarina │
# ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
# │ Paraná │
# └─────────────────────────────┘
t = sd.view("divisions")
t.select(common_name=t.names.common["en"]).filter(sd.col("common_name").is_not_null()).show(3)
# ┌────────────────┐
# │ common_name │
# │ utf8 │
# ╞════════════════╡
# │ Chapecó │
# ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
# │ Santa Catarina │
# ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
# │ Paraná │
# └────────────────┘
```
Closes #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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]