pwrliang commented on code in PR #737: URL: https://github.com/apache/sedona-db/pull/737#discussion_r3000550984
########## rust/sedona-spatial-join/src/prepare.rs: ########## Review Comment: We may use `SpatialJoinProvider` to create an instance of `SpatialIndexBuilder` ########## rust/sedona-spatial-join/src/join_provider.rs: ########## @@ -0,0 +1,95 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use arrow_array::ArrayRef; +use arrow_schema::SchemaRef; +use datafusion_common::Result; +use datafusion_expr::JoinType; +use sedona_common::SpatialJoinOptions; +use sedona_schema::datatypes::SedonaType; + +use crate::{ + index::{ + spatial_index_builder::{SpatialIndexBuilder, SpatialJoinBuildMetrics}, + DefaultSpatialIndexBuilder, + }, + operand_evaluator::EvaluatedGeometryArray, + SpatialPredicate, +}; + +/// Provider for join internals +/// +/// This trait provides an extension point for overriding the evaluation +/// details of a spatial join. In particular it allows plugging in a custom +/// index for accelerated joins on specific hardware (e.g., GPU) and a custom +/// bounder for specific data types (e.g., geography). +pub(crate) trait SpatialJoinProvider: std::fmt::Debug + Send + Sync { Review Comment: Can we change the visibility of `SpatialJoinProvider`, so the GPU join can exist in another crate? ########## rust/sedona-spatial-join/src/index/spatial_index_builder.rs: ########## Review Comment: We should change the visibility of `SpatialJoinBuildMetrics` to `pub`, so we can use `SpatialJoinProvider` out of the crate -- 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]
