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

LuciferYang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 3c3cb7a023 [GLUTEN-13763][CORE] Pass the memory manager capacity ratio 
to the native backend (#13764)
3c3cb7a023 is described below

commit 3c3cb7a0232b22b4652178557cdd354616125423
Author: YangJie <[email protected]>
AuthorDate: Tue Nov 24 21:36:52 2026 -0500

    [GLUTEN-13763][CORE] Pass the memory manager capacity ratio to the native 
backend (#13764)
    
    ## What changes are proposed in this pull request?
    
    `spark.gluten.memory.manager.capacity.ratio` (#12258) is read by 
`VeloxBackend` when it sizes the global Velox memory manager, but 
`GlutenConfig.getNativeBackendConf` did not forward it, so the setting had no 
effect and the native side always used its 0.75 default.
    
    The key is now in the list of keys that `getNativeBackendConf` forwards 
when set. When it is not set, nothing is passed and the native default still 
applies.
    
    Fixes #13763.
    
    ## How was this patch tested?
    
    Added a test to `VeloxConfigSuite` that checks `getNativeBackendConf` 
passes the ratio through when it is set and leaves it out when it is not. It 
fails on the old code.
    
    ## Was this patch authored or co-authored using generative AI tooling?
    
    Yes. Generated-by: Claude Opus.
---
 .../test/scala/org/apache/gluten/config/VeloxConfigSuite.scala    | 8 ++++++++
 .../src/main/scala/org/apache/gluten/config/GlutenConfig.scala    | 3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git 
a/backends-velox/src/test/scala/org/apache/gluten/config/VeloxConfigSuite.scala 
b/backends-velox/src/test/scala/org/apache/gluten/config/VeloxConfigSuite.scala
index 94c2412b75..269da07c7f 100644
--- 
a/backends-velox/src/test/scala/org/apache/gluten/config/VeloxConfigSuite.scala
+++ 
b/backends-velox/src/test/scala/org/apache/gluten/config/VeloxConfigSuite.scala
@@ -72,4 +72,12 @@ class VeloxConfigSuite extends AnyFunSuite {
         assert(native.get(nullStructKey).contains(value))
     }
   }
+
+  test("memory manager capacity ratio is passed to the native backend") {
+    val key = GlutenConfig.MEMORY_MANAGER_CAPACITY_RATIO.key
+    val conf = GlutenConfig.getNativeBackendConf("velox", Map(key -> "0.5"))
+    assert(conf.get(key) == "0.5")
+    // Not passed when unset, so the native default applies.
+    assert(!GlutenConfig.getNativeBackendConf("velox", 
Map.empty).containsKey(key))
+  }
 }
diff --git 
a/gluten-substrait/src/main/scala/org/apache/gluten/config/GlutenConfig.scala 
b/gluten-substrait/src/main/scala/org/apache/gluten/config/GlutenConfig.scala
index ad73a1a85c..a56c813d9d 100644
--- 
a/gluten-substrait/src/main/scala/org/apache/gluten/config/GlutenConfig.scala
+++ 
b/gluten-substrait/src/main/scala/org/apache/gluten/config/GlutenConfig.scala
@@ -719,7 +719,8 @@ object GlutenConfig extends ConfigRegistry {
       SPARK_REDACTION_REGEX,
       SQLConf.LEGACY_TIME_PARSER_POLICY.key,
       SQLConf.LEGACY_STATISTICAL_AGGREGATE.key,
-      COLUMNAR_CUDF_ENABLED.key
+      COLUMNAR_CUDF_ENABLED.key,
+      MEMORY_MANAGER_CAPACITY_RATIO.key
     )
 
     nativeConfMap ++= conf.filter {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to