Commit 72b178a
committed
[SEDONA-2880] GeoParquet reader: ignore [0,0,0,0] bbox fingerprint
Defensively guard `LeafFilter.evaluate` against legacy GeoParquet files
written by buggy versions of Sedona that emitted `bbox: [0, 0, 0, 0]`
in the metadata of zero-row files. When a file's bbox matches that
exact fingerprint, treat it as untrusted and skip bbox-based pruning.
Without this guard, files written by legacy Sedona with `bbox: [0, 0,
0, 0]` would be incorrectly retained for any query window intersecting
Null Island and incorrectly pruned for query windows that don't, neither
of which reflects the file's real (empty) contents.
Note: this could in theory over-include a real file whose geometries
all sit exactly at (0, 0) with zero extent, but such a file would also
be uninteresting for any spatial query and the over-inclusion is
harmless.1 parent 3b308d8 commit 72b178a
2 files changed
Lines changed: 59 additions & 1 deletion
File tree
- spark/common/src
- main/scala/org/apache/spark/sql/execution/datasources/geoparquet
- test/scala/org/apache/sedona/sql
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
75 | 89 | | |
76 | 90 | | |
77 | 91 | | |
| |||
Lines changed: 45 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
310 | 354 | | |
311 | 355 | | |
312 | 356 | | |
| |||
0 commit comments