Kontinuation commented on code in PR #534:
URL: https://github.com/apache/sedona-db/pull/534#discussion_r2712548934


##########
rust/sedona-spatial-join/src/index/build_side_collector.rs:
##########
@@ -115,12 +128,23 @@ impl BuildSideBatchesCollector {
             in_mem_batches.push(build_side_batch);
         }
 
+        let geo_statistics = analyzer.finish();
+        let extra_mem = SpatialIndexBuilder::estimate_extra_memory_usage(
+            &geo_statistics,
+            &self.spatial_predicate,
+            &self.spatial_join_options,
+        );
+
+        // Try to grow the reservation with a safety buffer to leave room for 
additional data structures
+        let additional_reservation = extra_mem + (extra_mem + 
reservation.size()) / 5;

Review Comment:
   Defined it as a constant with floating point value 0.20.



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