paleolimbot commented on code in PR #1073:
URL: https://github.com/apache/sedona-db/pull/1073#discussion_r3653823152
##########
rust/sedona-spatial-join-raster/src/join_provider.rs:
##########
@@ -45,22 +51,33 @@ use sedona_spatial_join::{
///
/// The R-tree index builder and the memory estimate delegate to the default
/// provider; only the operand evaluator is raster-aware. The factory it
produces
-/// reprojects raster footprints into `target_crs` (the geometry operand's
CRS).
+/// reprojects raster footprints into `target_crs` (the geometry operand's CRS)
+/// using the session's [`CrsEngine`], captured at plan time.
#[derive(Debug)]
pub(crate) struct RasterJoinProvider {
default: DefaultSpatialJoinProvider,
target_crs: Crs,
+ engine: Arc<dyn CrsEngine + Send + Sync>,
}
impl RasterJoinProvider {
- pub(crate) fn new(target_crs: Crs) -> Self {
+ pub(crate) fn new(target_crs: Crs, engine: Arc<dyn CrsEngine + Send +
Sync>) -> Self {
Self {
default: DefaultSpatialJoinProvider,
target_crs,
+ engine,
}
}
}
+/// Pin the join's refiner to `tg`, the engine the `RS_*` predicate kernel
uses,
+/// so the accelerated join and the kernel resolve boundary/touching cases
+/// identically regardless of the session's `spatial_join.spatial_library`.
+fn pin_refiner_to_tg(mut options: SpatialJoinOptions) -> SpatialJoinOptions {
+ options.spatial_library = SpatialLibrary::Tg;
+ options
+}
Review Comment:
Great idea 👍
--
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]