You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/12/07 09:25:45 UTC

[GitHub] [spark] yaooqinn commented on a change in pull request #30642: [SPARK-32991][SQL][FOLLOWUP] Make SharedState JVM-wide accessible and Reset command rely on session initials first

yaooqinn commented on a change in pull request #30642:
URL: https://github.com/apache/spark/pull/30642#discussion_r537351390



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala
##########
@@ -172,14 +172,19 @@ object SetCommand {
 case class ResetCommand(config: Option[String]) extends RunnableCommand with IgnoreCachedData {
 
   override def run(sparkSession: SparkSession): Seq[Row] = {
-    val defaults = sparkSession.sharedState.conf
+    val globalInitialConfigs = sparkSession.sharedState.conf
+    val sessionDefaults = sparkSession.initialSessionOptions.filter {
+      case (k, _) => !SQLConf.staticConfKeys.contains(k)

Review comment:
       Now there only one  `sharedState` created by the original session, the static SQL configs here clearly follow the copy in `sharedState`, and other dynamic SQL configs will respect the session's own `initialSessionOptions`.
   
   In this case, the static ones in `initialSessionOptions` are ineffective. BUT it is hard to distinguish spark-core, runtime-SQL, and user ones,  the latter 2 will be reset and effective and the spark-core ones are not effective but will be reset.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org