petern48 commented on PR #369: URL: https://github.com/apache/sedona-db/pull/369#issuecomment-3586564968
Nice, looks like you're making good progress. Fixing some of the rust issues. Now we need to fix the python tests. Here's a useful tip to help with your local development: Here's how you can execute queries on PostGIS Docker container 1. Start the postgis docker container (for you knowledge it runs this [compose.yml](https://github.com/apache/sedona-db/blob/16d232be0f28441b85801936b270fa43f7edceb4/compose.yml#L4) file. ``` docker compose up -d # output: [+] Running 1/1 ✔ Container sedona-db-postgis-1 Running0.0s ``` 2. Assuming it spun up properly, Now you can exec into that to enter the Postgres / PostGIS shell using the container name. It's usually the same for everyone `sedona-db-postgis-1`. ``` docker exec -it sedona-db-postgis-1 psql -U postgres # output: psql (18.0 (Debian 18.0-1.pgdg13+3)) Type "help" for help. postgres=# ``` Now you can execute queries locally against PostGIS (which is a correct solution we model SedonaDB after). ``` postgres=# SELECT ST_NumInteriorRings(ST_GeomFromText('POLYGON ((0 0,6 0,6 6,0 6,0 0), (2 2,4 2,4 4,2 4,2 2))')); -- output: st_numinteriorrings --------------------- 1 ``` To help with testing you can copy-paste the geometries you're using in your tests to replace that Polygon in my example query. Based on the error in the [last Python CI run](https://github.com/apache/sedona-db/actions/runs/19741057767/job/56564766173?pr=369), it looks like at least one of the geometries is formatted improperly. You can use PostGIS to iterate and fix it faster. ``` FAILED sedonadb/tests/functions/test_functions.py::test_st_numinteriorrings_basic[POLYGON ( (0 0,10 0,10 6,0 6,0 0) (1 1,2 1,2 5,1 5,1 1), (8 5,8 4,9 4,9 5,8 5))-2-SedonaDB] - pyarrow.lib.ArrowInvalid: External error: Internal error: WKT parse error: Missing closing parenthesis for type. ``` You can see which polygon is problematic there in the error message. What I would do, is spin up the postgis container, and try running the SQL query I wrote above on each of the polygons in your tests. You're probably missing a parentheses somewhere or have an extra one. -- 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]
