bug: Fix SpatialFilter for correct pruning when reading from geoparquet#51
bug: Fix SpatialFilter for correct pruning when reading from geoparquet#51jiayuasu merged 7 commits intoapache:mainfrom
SpatialFilter for correct pruning when reading from geoparquet#51Conversation
|
Hi, it's me 🤠. I originally picked this up thinking this would be a simple one-liner fix. However, when I ran all of the predicates against geopandas output (the integration test), I saw there were more buggy predicate functions (e.g st_covers, st_contains, st_coveredby, st_within) than the original ones I expected. Using new integration tests, I specifically found that the You're welcome to propose a different direction, if you can think of one. |
Kontinuation
left a comment
There was a problem hiding this comment.
Yes, the fix is correct.
Only contains/covers can be pushed down, not within/covered_by.
SpatialFilter for st_covers and st_contains for correct pruningSpatialFilter for correct pruning when reading from geoparquet
This PR fixes some bugs in the SpatialFilter used for pruning. The code now follows the same logic as used in the original Apache Sedona code here. Essentially, it uses a
CoversSpatialFilter instead of aCoveredBy, and updates the code accordingly.For example,
st_covered_byfunction was modified in the following wayCoveredByfilter, else if (literal, column, use aIntersectsfilter."Intersectsfilter, else if (literal column, use aCoversfilter."closes #49