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

    https://github.com/apache/spark/pull/20969#discussion_r179020152
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala ---
    @@ -159,9 +159,10 @@ private[hive] class TestHiveSparkSession(
         private val loadTestTables: Boolean)
       extends SparkSession(sc) with Logging { self =>
     
    -  // TODO(SPARK-23826): TestHiveSparkSession should set default session 
the same way as
    -  // TestSparkSession, but doing this the same way breaks many tests in 
the package. We need
    -  // to investigate and find a different strategy.
    +  // The base spark session does this in getOrCreate(), here we emulate 
that behavior for tests.
    +  if (SparkSession.getDefaultSession.isEmpty) {
    +    SparkSession.setDefaultSession(this)
    +  }
    --- End diff --
    
    This is not needed after we merge https://github.com/apache/spark/pull/20927


---

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

Reply via email to