Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed after we merge #20927


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