taiyang-li commented on code in PR #12437:
URL: https://github.com/apache/gluten/pull/12437#discussion_r3526342712


##########
gluten-substrait/src/main/scala/org/apache/gluten/config/GlutenConfig.scala:
##########
@@ -532,10 +533,18 @@ object GlutenConfig extends ConfigRegistry {
     
"spark.gluten.sql.columnar.backend.velox.columnarBatchSerializerCompression"
   )
 
+  private def backendSettings(backendName: String) = {
+    // Only one backend is loaded in a running Gluten session. Use backend 
settings hooks to avoid
+    // hard-coding backend-specific configs in common code.
+    BackendsApiManager.getSettings
+  }
+
   /** Get dynamic configs. */
   def getNativeSessionConf(backendName: String, conf: Map[String, String]): 
Map[String, String] = {
+    val settings = backendSettings(backendName)
     val nativeConfMap = mutable.Map[String, String](conf.filter {
-      case (key, _) => nativeKeys.contains(key)
+      case (key, _) =>
+        nativeKeys.contains(key) || 
settings.extraNativeSessionConfKeys().contains(key)

Review Comment:
   @zhouyuan This is intentional. The bolt backend may transmit bolt-related 
configs. This interface is added to minimize intrusion of GlutenConfig.scala 
code. Currently, `extraNativeSessionConfKeys` is empty by default to avoid 
affecting existing velox/ch backends.



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


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

Reply via email to