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

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


The following commit(s) were added to refs/heads/main by this push:
     new ceff106850 [GLUTEN-10774][VL][FOLLOWUP] Strip quotes for OS name and 
version (#10850)
ceff106850 is described below

commit ceff106850388172bbe28debb7603a1dc187fc30
Author: Joey <[email protected]>
AuthorDate: Thu Oct 9 14:16:27 2025 +0800

    [GLUTEN-10774][VL][FOLLOWUP] Strip quotes for OS name and version (#10850)
---
 .../org/apache/gluten/utils/SharedLibraryLoaderUtils.scala     | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git 
a/backends-velox/src/main/scala/org/apache/gluten/utils/SharedLibraryLoaderUtils.scala
 
b/backends-velox/src/main/scala/org/apache/gluten/utils/SharedLibraryLoaderUtils.scala
index a66a351d9e..6ae8fb593d 100755
--- 
a/backends-velox/src/main/scala/org/apache/gluten/utils/SharedLibraryLoaderUtils.scala
+++ 
b/backends-velox/src/main/scala/org/apache/gluten/utils/SharedLibraryLoaderUtils.scala
@@ -35,6 +35,14 @@ object SharedLibraryLoaderUtils {
     osName.startsWith("Mac OS X") || osName.startsWith("macOS")
   }
 
+  private def stripQuotes(s: String): String = {
+    if (s == null) {
+      null
+    } else {
+      s.stripPrefix("\"").stripSuffix("\"")
+    }
+  }
+
   def load(conf: SparkConf, jni: JniLibLoader): Unit = {
     val shouldLoad = conf.get(GLUTEN_LOAD_LIB_FROM_JAR)
     if (!shouldLoad) {
@@ -57,7 +65,7 @@ object SharedLibraryLoaderUtils {
         val props = new Properties()
         val in = new FileInputStream("/etc/os-release")
         props.load(in)
-        (props.getProperty("NAME"), props.getProperty("VERSION"))
+        (stripQuotes(props.getProperty("NAME")), 
stripQuotes(props.getProperty("VERSION")))
     }
 
     val loaders = ServiceLoader


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

Reply via email to