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

    https://github.com/apache/spark/pull/6563#discussion_r31490129
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala ---
    @@ -37,6 +38,48 @@ class VersionsSuite extends SparkFunSuite with Logging {
           "hive.metastore.warehouse.dir" -> warehousePath.toString)
       }
     
    +  test("SPARK-8020: successfully create a HiveContext with metastore 
settings in Spark conf.") {
    +    val sparkConf =
    +      new SparkConf() {
    +        // We are not really clone it. We need to keep the custom getAll.
    +        override def clone: SparkConf = this
    +
    +        override def getAll: Array[(String, String)] = {
    +          val allSettings = super.getAll
    +          val metastoreVersion = get("spark.sql.hive.metastore.version")
    +          val metastoreJars = get("spark.sql.hive.metastore.jars")
    +
    +          val others = allSettings.filterNot { case (key, _) =>
    +            key == "spark.sql.hive.metastore.version" || key == 
"spark.sql.hive.metastore.jars"
    +          }
    +
    +          // Put metastore.version to the first one. It is needed to 
trigger the exception
    +          // caused by SPARK-8020. Other problems triggered by SPARK-8020
    +          // (e.g. using Hive 0.13.1's metastore client to connect to the 
a 0.12 metastore)
    +          // are not easy to test.
    +          Array(
    +            ("spark.sql.hive.metastore.version" -> metastoreVersion),
    +            ("spark.sql.hive.metastore.jars" -> metastoreJars)) ++ others
    +        }
    +      }
    +    sparkConf
    +      .set("spark.sql.hive.metastore.version", "12")
    --- End diff --
    
    Does `12` equate to `0.12.0` or `1.2`?


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