Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18852#discussion_r131527017
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/internal/SQLConfSuite.scala ---
    @@ -270,4 +270,10 @@ class SQLConfSuite extends QueryTest with 
SharedSQLContext {
         val e2 = 
intercept[AnalysisException](spark.conf.unset(SCHEMA_STRING_LENGTH_THRESHOLD.key))
         assert(e2.message.contains("Cannot modify the value of a static 
config"))
       }
    +
    +  test("SPARK-21588 SQLContext.getConf(key, null) should return null") {
    +    assert(null == 
spark.conf.get("spark.sql.thriftServer.incrementalCollect", null))
    +    assert("<undefined>" == spark.conf.get(
    +      "spark.sql.thriftServer.incrementalCollect", "<undefined>"))
    --- End diff --
    
    The test cases need to be improved. 
    ```Scala
        withSQLConf(SQLConf.SHUFFLE_PARTITIONS.key -> "1") {
          assert("1" == spark.conf.get(SQLConf.SHUFFLE_PARTITIONS.key, null))
          assert("1" == spark.conf.get(SQLConf.SHUFFLE_PARTITIONS.key, 
"<undefined>"))
        }
    
        assert(spark.conf.getOption("spark.sql.nonexistent").isEmpty)
        assert(null == spark.conf.get("spark.sql.nonexistent", null))
        assert("<undefined>" == spark.conf.get("spark.sql.nonexistent", 
"<undefined>"))
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to