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

    https://github.com/apache/spark/pull/19719#discussion_r150366200
  
    --- Diff: 
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala
 ---
    @@ -521,7 +521,20 @@ class HiveThriftBinaryServerSuite extends 
HiveThriftJdbcTest {
             conf += resultSet.getString(1) -> resultSet.getString(2)
           }
     
    -      assert(conf.get("spark.sql.hive.metastore.version") === 
Some("1.2.1"))
    +      assert(conf.get("spark.sql.hive.version") === Some("1.2.1"))
    +    }
    +  }
    +
    +  test("Checks Hive version via SET") {
    +    withJdbcStatement() { statement =>
    +      val resultSet = statement.executeQuery("SET")
    +
    +      val conf = mutable.Map.empty[String, String]
    +      while (resultSet.next()) {
    +        conf += resultSet.getString(1) -> resultSet.getString(2)
    +      }
    +
    +      assert(conf.get("spark.sql.hive.version") === Some("1.2.1"))
    --- End diff --
    
    In Hive, "SET" returns all changed properties while "SET -v" returns all 
properties. In Spark, `SET` ueries all key-value pairs that are **set** in the 
SQLConf of the sparkSession.


---

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

Reply via email to