Skip to content

Commit

Permalink
fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
gatorsmile committed Apr 3, 2018
1 parent a7c19d9 commit 228730b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

def this(sc: SparkContext, loadTestTables: Boolean) {
this(
Expand Down

0 comments on commit 228730b

Please sign in to comment.