jiayuasu opened a new issue, #2809:
URL: https://github.com/apache/sedona/issues/2809

   ## Description
   
   Distance joins (`ST_DWithin`, `ST_Distance < r`) are not currently supported 
when raster predicates are involved. Attempting this combination will throw 
`UnsupportedOperationException`.
   
   ## Root cause
   
   In `BroadcastIndexJoinExec.createStreamShapes`, when `distance` is defined, 
the code always uses `GeometrySerializer.deserialize` to decode the stream 
side. If the stream side is a raster, this will fail because raster bytes 
cannot be deserialized as geometry.
   
   The non-distance path already handles rasters correctly by checking 
`isRasterPredicate` and using `RasterSerializer.deserialize` + 
`JoinedGeometryRaster.rasterToWGS84Envelope`.
   
   ## What needs to happen
   
   - Add raster-aware deserialization in the `distance` branch of 
`createStreamShapes`
   - Implement raster envelope expansion by the distance radius (e.g., expand 
the WGS84 envelope)
   - Update the plan string in `BroadcastIndexJoinExec` and `JoinQueryDetector` 
to reflect the supported combination
   - Remove the `UnsupportedOperationException` guards added in #2801
   
   ## References
   
   - `BroadcastIndexJoinExec.scala` lines 292-311
   - `JoinQueryDetector.scala` lines 786-792


-- 
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]

Reply via email to