You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "jiayuasu (via GitHub)" <gi...@apache.org> on 2026/06/30 19:24:29 UTC
[I] RS_DWithin / raster distance join leaks GridCoverage2D rasters (plus empty-envelope and EXPLAIN issues) [sedona]
jiayuasu opened a new issue, #3089:
URL: https://github.com/apache/sedona/issues/3089
The raster distance-join support added in #2980 (GH-2809) deserializes `GridCoverage2D` rasters in several hot paths **without calling `dispose(true)`**, leaking off-heap native raster memory on long-running executors. Sibling raster paths (`RS_Predicate.evaluator`, `TraitJoinQueryBase.toWGS84EnvelopeRDD`) already dispose via `try/finally`.
### Resource leaks (3 sites)
1. `RS_DWithin.eval` (`RasterPredicates.scala`) — deserializes raster(s), calls `RasterPredicates.rsDWithin`, never disposes.
2. `TraitJoinQueryBase.toExpandedWGS84EnvelopeRDD` — deserializes a raster for its WGS84 envelope, no dispose.
3. `BroadcastIndexJoinExec` raster distance stream-side branch — same pattern.
Fix: wrap each deserialization in `try/finally { raster.dispose(true) }`, mirroring the sibling paths.
### Related, lower severity
- `expandRasterFilterEnvelope` expands an empty / `NullGeometry` `baseShape` (the substitute for NULL inputs in `toExpandedWGS84EnvelopeRDD`) into a non-empty filter envelope, which can spuriously match rows that should never join. It should return the empty geometry unchanged.
- The raster distance-join physical node's `simpleString` renders `RS_Distance(...) < r`, but there is no `RS_Distance` SQL function — the join key is `RS_DWithin`, so `EXPLAIN` output is misleading.
I have fixes for all of these and can open a PR.
--
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: issues-unsubscribe@sedona.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Raster distance join: NULL inputs produce spurious R-tree candidates, plus misleading RS_Distance EXPLAIN label [sedona]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu closed issue #3089: Raster distance join: NULL inputs produce spurious R-tree candidates, plus misleading RS_Distance EXPLAIN label
URL: https://github.com/apache/sedona/issues/3089
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org