cloud-fan commented on a change in pull request #28003: [SPARK-31234][SQL] 
ResetCommand should reset config to sc.conf only
URL: https://github.com/apache/spark/pull/28003#discussion_r397682740
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
 ##########
 @@ -3258,7 +3258,9 @@ class SQLConf extends Serializable with Logging {
   }
 
   def clear(): Unit = {
+    val reserved = settings.asScala.filterKeys(staticConfKeys.contains).toMap
     settings.clear()
+    settings.putAll(reserved.asJava)
 
 Review comment:
   is this change necessary? static SQL configs can only be set with 
`SparkConf`. We can clear everything here, and the `RESET` command will add 
back the configs in `SparkConf`

----------------------------------------------------------------
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


With regards,
Apache Git Services

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

Reply via email to