This is an automated email from the ASF dual-hosted git repository.

csy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/auron.git


The following commit(s) were added to refs/heads/master by this push:
     new 4710026f Deprecate RuntimeConfig, update code to use new builder style 
(#1255)
4710026f is described below

commit 4710026fdd23b7f91b618907246da3cc08de6882
Author: bkhan <[email protected]>
AuthorDate: Tue Sep 2 10:23:52 2025 +0800

    Deprecate RuntimeConfig, update code to use new builder style (#1255)
---
 native-engine/auron/src/exec.rs | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/native-engine/auron/src/exec.rs b/native-engine/auron/src/exec.rs
index e8534587..d8e4bdf8 100644
--- a/native-engine/auron/src/exec.rs
+++ b/native-engine/auron/src/exec.rs
@@ -13,8 +13,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-use std::sync::Arc;
-
 use auron_jni_bridge::{
     conf::{DoubleConf, IntConf},
     jni_bridge::JavaClasses,
@@ -24,8 +22,9 @@ use datafusion::{
     common::Result,
     error::DataFusionError,
     execution::{
-        disk_manager::DiskManagerConfig,
-        runtime_env::{RuntimeConfig, RuntimeEnv},
+        SessionStateBuilder,
+        disk_manager::{DiskManagerBuilder, DiskManagerMode},
+        runtime_env::RuntimeEnvBuilder,
     },
     prelude::{SessionConfig, SessionContext},
 };
@@ -85,11 +84,16 @@ pub extern "system" fn 
Java_org_apache_spark_sql_auron_JniBridge_callNative(
                     .execution
                     .parquet
                     .schema_force_view_types = false;
-
-                let runtime_config =
-                    
RuntimeConfig::new().with_disk_manager(DiskManagerConfig::Disabled);
-                let runtime = Arc::new(RuntimeEnv::new(runtime_config)?);
-                let session = 
SessionContext::new_with_config_rt(session_config, runtime);
+                let diskManagerBuilder =
+                    
DiskManagerBuilder::default().with_mode(DiskManagerMode::Disabled);
+                let runtime = RuntimeEnvBuilder::new()
+                    .with_disk_manager_builder(diskManagerBuilder)
+                    .build_arc()?;
+                let state = SessionStateBuilder::new()
+                    .with_config(session_config)
+                    .with_runtime_env(runtime)
+                    .build();
+                let session = SessionContext::from(state);
                 Ok::<_, DataFusionError>(session)
             })?;
             Ok::<_, DataFusionError>(())

Reply via email to