Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/20404#discussion_r164266681
--- Diff: python/pyspark/sql/session.py ---
@@ -225,6 +225,7 @@ def __init__(self, sparkContext, jsparkSession=None):
if SparkSession._instantiatedSession is None \
or SparkSession._instantiatedSession._sc._jsc is None:
SparkSession._instantiatedSession = self
+
self._jvm.org.apache.spark.sql.SparkSession.setDefaultSession(self._jsparkSession)
--- End diff --
I think this is somewhat conflicted ... If I can SparkSession.getOrCreate
in python and JVM already has a defaultSession, what should happen?
I suppose one approach would be to keep python independent.. but with this
change it would overwrite the defaultSession that might be valid?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]