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


##########
python/sedonadb/src/context.rs:
##########
@@ -39,15 +47,59 @@ pub struct InternalContext {
 #[pymethods]
 impl InternalContext {
     #[new]
-    fn new(py: Python) -> Result<Self, PySedonaError> {
+    #[pyo3(signature = (memory_limit=None, temp_dir=None, 
memory_pool_type=None, unspillable_reserve_ratio=None))]
+    fn new(
+        py: Python,
+        memory_limit: Option<usize>,
+        temp_dir: Option<String>,
+        memory_pool_type: Option<String>,
+        unspillable_reserve_ratio: Option<f64>,
+    ) -> Result<Self, PySedonaError> {
         let runtime = tokio::runtime::Builder::new_multi_thread()
             .enable_all()
             .build()
             .map_err(|e| {
                 PySedonaError::SedonaPython(format!("Failed to build 
multithreaded runtime: {e}"))
             })?;
 
-        let inner = wait_for_future(py, &runtime, 
SedonaContext::new_local_interactive())??;
+        let mut rt_builder = RuntimeEnvBuilder::new();
+        if let Some(memory_limit) = memory_limit {
+            let pool_type: PoolType = memory_pool_type
+                .as_deref()
+                .unwrap_or("fair")

Review Comment:
   Changed default to greedy



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