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

    https://github.com/apache/spark/pull/11836#discussion_r57199331
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala ---
    @@ -83,26 +154,6 @@ class TestHiveContext(sc: SparkContext) extends 
HiveContext(sc) {
     
       hiveconf.set("hive.plan.serialization.format", "javaXML")
     
    -  lazy val warehousePath = Utils.createTempDir(namePrefix = "warehouse-")
    -
    -  lazy val scratchDirPath = {
    -    val dir = Utils.createTempDir(namePrefix = "scratch-")
    -    dir.delete()
    -    dir
    -  }
    -
    -  private lazy val temporaryConfig = 
newTemporaryConfiguration(useInMemoryDerby = false)
    --- End diff --
    
    I see why we have to remove 
    ```
    TestHiveContext.hiveClientConfigurations(hiveconf, warehousePath, 
scratchDirPath)
      .foreach { case (k, v) => metadataHive.runSqlHive(s"SET $k=$v") }
    ```
    in 
https://github.com/apache/spark/pull/11836/commits/16a54bad76a8297f15417ba931d20c4d86092c84.
 temporaryConfig was originally a lazy val. But, if we use 
hiveClientConfigurations, we are actually generate new confs every time we call 
reset. 


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to