Skip to content

Commit b33d254

Browse files
committed
update
1 parent f6df6a8 commit b33d254

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python/pyspark/sql/tests/test_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_set_jvm_default_session(self):
6161

6262
def test_jvm_default_session_already_set(self):
6363
# Here, we assume there is the default session already set in JVM.
64-
jsession = self.sc._jvm.SparkSession(self.sc._jsc.sc(), self.sc._jvm.PythonUtils.toScalaMap({}))
64+
jsession = self.sc._jvm.SparkSession(self.sc._jsc.sc())
6565
self.sc._jvm.SparkSession.setDefaultSession(jsession)
6666

6767
spark = SparkSession.builder.getOrCreate()

sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ class SparkSession private(
9191
// The call site where this SparkSession was constructed.
9292
private val creationSite: CallSite = Utils.getCallSite()
9393

94-
private[sql] def this(sc: SparkContext) = this(sc, Map.empty)
95-
9694
/**
9795
* Constructor used in Pyspark. Contains explicit application of Spark Session Extensions
9896
* which otherwise only occurs during getOrCreate. We cannot add this to the default constructor
@@ -106,6 +104,8 @@ class SparkSession private(
106104
new SparkSessionExtensions), initialSessionOptions)
107105
}
108106

107+
private[sql] def this(sc: SparkContext) = this(sc, Map.empty)
108+
109109
private[sql] val sessionUUID: String = UUID.randomUUID.toString
110110

111111
sparkContext.assertNotStopped()

0 commit comments

Comments
 (0)