Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions rust/sedona-spatial-join/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
// under the License.

pub(crate) mod build_side_collector;
pub(crate) mod default_spatial_index;
pub(crate) mod default_spatial_index_builder;
mod knn_adapter;
pub(crate) mod memory_plan;
pub(crate) mod partitioned_index_provider;
Expand All @@ -25,8 +27,9 @@ pub(crate) mod spatial_index_builder;
pub(crate) use build_side_collector::{
BuildPartition, BuildSideBatchesCollector, CollectBuildSideMetrics,
};
pub use spatial_index::SpatialIndex;
pub use spatial_index_builder::{SpatialIndexBuilder, SpatialJoinBuildMetrics};
pub(crate) use spatial_index::SpatialIndex;

pub use default_spatial_index_builder::DefaultSpatialIndexBuilder;
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefaultSpatialIndexBuilder is re-exported as pub from the (private) index module. This is likely to trigger the unreachable_pub lint (and makes API intent unclear). Consider changing this to pub(crate) use ... if it’s internal-only, or make the type reachable from the crate root (e.g., re-export from lib.rs) if it’s intended as public API.

Suggested change
pub use default_spatial_index_builder::DefaultSpatialIndexBuilder;
pub(crate) use default_spatial_index_builder::DefaultSpatialIndexBuilder;

Copilot uses AI. Check for mistakes.
use wkb::reader::Wkb;

/// The result of a spatial index query
Expand Down
5 changes: 3 additions & 2 deletions rust/sedona-spatial-join/src/index/build_side_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ use sedona_expr::statistics::GeoStatistics;
use sedona_functions::st_analyze_agg::AnalyzeAccumulator;
use sedona_schema::datatypes::WKB_GEOMETRY;

use crate::index::spatial_index_builder::SpatialIndexBuilder;
use crate::index::DefaultSpatialIndexBuilder;
use crate::{
evaluated_batch::{
evaluated_batch_stream::{
Expand All @@ -41,7 +43,6 @@ use crate::{
spill::EvaluatedBatchSpillWriter,
EvaluatedBatch,
},
index::SpatialIndexBuilder,
operand_evaluator::{create_operand_evaluator, OperandEvaluator},
spatial_predicate::SpatialPredicate,
utils::bbox_sampler::{BoundingBoxSampler, BoundingBoxSamples},
Expand Down Expand Up @@ -217,7 +218,7 @@ impl BuildSideBatchesCollector {
}

let geo_statistics = analyzer.finish();
let extra_mem = SpatialIndexBuilder::estimate_extra_memory_usage(
let extra_mem = DefaultSpatialIndexBuilder::estimate_extra_memory_usage(
&geo_statistics,
&self.spatial_predicate,
&self.spatial_join_options,
Expand Down
Loading