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/10/16 12:00:58 UTC

[GitHub] [spark] yaooqinn commented on a change in pull request #30045: [SPARK-32991][SQL] Use conf in shared state as the original configuraion for RESET

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



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