paleolimbot opened a new issue, #225:
URL: https://github.com/apache/sedona-db/issues/225
Not sure if this is something that was supposed to work already or not, but
the following example doesn't execute for me without downloading all of
Overture buildings:
```python
import sedona.db
sd = sedona.db.connect()
sd.read_parquet(
"s3://overturemaps-us-west-2/release/2025-08-20.0/theme=buildings/type=building/",
options={"aws.skip_signature": True, "aws.region": "us-west-2"},
).to_view("buildings", overwrite=True)
sd.sql("""
SELECT label, ST_SetSRID(ST_GeomFromWKT(wkt), 4326) AS poly
FROM (VALUES
('A', 'POLYGON ((-73.22 44.03, -73.22 44.01, -73.17 44.01, -73.18 44.03,
-73.22 44.03))'),
('B', 'POLYGON ((-73.14 44.03, -73.14 44.01, -73.08 44.01, -73.09 44.03,
-73.14 44.03))'),
('C', 'POLYGON ((-73.19 43.99, -73.18 43.96, -73.11 43.96, -73.12 44.00,
-73.19 43.99))')
) AS t(label, wkt)
""").to_view("join_table", overwrite=True)
sd.sql("""
SELECT join_table.label, buildings.id, buildings.geometry
FROM buildings
JOIN join_table
ON ST_Contains(join_table.poly, buildings.geometry)
""").explain().show()
```
I am not sure if the solution here is in the spatial join or whether the
solution is to start implementing Statistics propagation.
--
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]