cloud-fan commented on a change in pull request #35059:
URL: https://github.com/apache/spark/pull/35059#discussion_r776385660
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/util/QueryExecutionListener.scala
##########
@@ -74,15 +75,19 @@ trait QueryExecutionListener {
// The `loadExtensions` flag is used to indicate whether we should load the
pre-defined,
// user-specified listeners during construction. We should not do it when
cloning this listener
// manager, as we will copy all listeners to the cloned listener manager.
-class ExecutionListenerManager private[sql](session: SparkSession,
loadExtensions: Boolean)
+class ExecutionListenerManager private[sql](
+ session: SparkSession,
+ sqlConf: SQLConf,
+ loadExtensions: Boolean)
extends Logging {
private val listenerBus = new ExecutionListenerBus(this, session)
if (loadExtensions) {
val conf = session.sparkContext.conf
conf.get(QUERY_EXECUTION_LISTENERS).foreach { classNames =>
- Utils.loadExtensions(classOf[QueryExecutionListener], classNames,
conf).foreach(register)
Review comment:
what if we wrap this with `SQLConf.withExistingConf(conf) {}`? Then
people can do `SQLConf.get` in their listeners.
--
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]