yaooqinn commented on a change in pull request #28316:
URL: https://github.com/apache/spark/pull/28316#discussion_r414248316
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
##########
@@ -905,7 +905,9 @@ object SparkSession extends Logging {
// Get the session from current thread's active session.
var session = activeThreadSession.get()
if ((session ne null) && !session.sparkContext.isStopped) {
- options.foreach { case (k, v) =>
session.sessionState.conf.setConfString(k, v) }
+ for ((k, v) <- options if !SQLConf.staticConfKeys.contains(k)) {
Review comment:
+1 too. we can warn static SQL separately. But do we still need a
general warning messages for core configurations?
e.g.
```scala
for ((k, v) <- options) {
if (SQLConf.staticConfKeys.contains(k)) {
logWarning(s"Using an existing SparkSession, the static
configuration $k is ignored.")
} else {
session.sessionState.conf.setConfString(k, v)
}
}
if ((options -- SQLConf.staticConfKeys.asScala).nonEmpty) {
logWarning("Using an existing SparkSession; some spark core
configurations may not take" +
" effect.")
}
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]