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



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala
##########
@@ -172,7 +172,7 @@ object SetCommand {
 case class ResetCommand(config: Option[String]) extends RunnableCommand with 
IgnoreCachedData {
 
   override def run(sparkSession: SparkSession): Seq[Row] = {
-    val defaults = sparkSession.sparkContext.conf
+    val defaults = sparkSession.sharedState.conf

Review comment:
       No. The `sharedState.conf` is a cloned `sparkContext.conf` with other 
initial options including the warehouse dir and other static/dynamic configs 
set by the 1st SparkSession instance which creates the one and only 
`sharedState`. 
   If there is existing sc when we create the 1st SparkSession (e.g. see the PR 
description), the initial configs will go to the `sharedState.conf`, and we use 
this version of conf as defaults. Also, later created SparkSession with other 
options will not affect the `sharedState.conf`




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



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

Reply via email to