beliefer commented on code in PR #8962:
URL: https://github.com/apache/incubator-gluten/pull/8962#discussion_r1993387342


##########
shims/common/src/main/scala/org/apache/gluten/config/GlutenConfig.scala:
##########
@@ -33,9 +34,13 @@ case class GlutenNumaBindingInfo(
     totalCoreRange: Array[String] = null,
     numCoresPerExecutor: Int = -1) {}
 
-class GlutenConfig(conf: SQLConf) extends Logging {
+class GlutenConfig(sessionOpt: Option[SparkSession] = None) extends Logging {

Review Comment:
   The original construct that pass `SQLConf` is a mistake.
   We should get it with `session.sessionState.conf `first. Otherwise, we 
should get it with `SQLConf.get` if we can't hold the spark session.
   `session.sessionState.conf` have better performance than `SQLConf.get`. 
Please refer https://github.com/apache/spark/pull/48693
   
   Anyway, we can't pass `SQLConf` as parameter or declare it as a variable. 
The two methods are invalid:
   `def someFunction(conf: SQLConf) ...`
   `val conf: SQLConf = ...`
   



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