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


##########
rust/sedona-spatial-join/src/build_index.rs:
##########
@@ -33,7 +33,72 @@ use crate::{
     spatial_predicate::SpatialPredicate,
 };
 
-pub(crate) async fn build_index(
+/// Synchronous version of build_index that doesn't spawn tasks
+/// Used in execution contexts without async runtime support (e.g., 
Spark/Comet JNI)
+pub async fn build_index_sync(

Review Comment:
   Comet is using a multi-thread Tokio runtime according to 
[jni_api.rs](https://github.com/apache/datafusion-comet/blob/0.12.0/native/core/src/execution/jni_api.rs#L90-L102),
 and the Tokio runtime will use default config if `COMET_*` environment 
variables are not present.
   
   The problem may not be the usage of single-threaded runtime, probably there 
are too-many in-flight queries and the workers pool have been exhausted. No 
matter what the actual problem is, a sequential index building option is always 
a good thing to have.



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