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/07/24 06:11:36 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #29202: [SPARK-32406][SQL] Make RESET syntax support single configuration reset

HyukjinKwon commented on a change in pull request #29202:
URL: https://github.com/apache/spark/pull/29202#discussion_r459868527



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/internal/SQLConfSuite.scala
##########
@@ -181,6 +181,21 @@ class SQLConfSuite extends QueryTest with SharedSparkSession {
     }
   }
 
+  test("reset - single configuration") {
+    val appId = spark.sparkContext.getConf.getAppId
+    sql("RESET spark.app.id")
+    assert(spark.conf.get("spark.app.id") === appId, "Should not change spark core ones")
+    sql("SET spark.abc=xyz")
+    assert(spark.conf.get("spark.abc") === "xyz")
+    sql("RESET spark.abc")
+    intercept[NoSuchElementException](spark.conf.get("spark.abc"))
+    sql("RESET spark.abc")
+    val original = spark.conf.get(SQLConf.GROUP_BY_ORDINAL)
+    sql(s"set ${SQLConf.GROUP_BY_ORDINAL.key}=false")

Review comment:
       tiny nit: maybe `set` -> `SET` just for consistency.




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