HyukjinKwon commented on a change in pull request #34559:
URL: https://github.com/apache/spark/pull/34559#discussion_r758001741



##########
File path: python/pyspark/sql/session.py
##########
@@ -301,6 +306,9 @@ def __init__(self, sparkContext: SparkContext, 
jsparkSession: Optional[JavaObjec
                 jsparkSession = 
self._jvm.SparkSession.getDefaultSession().get()
             else:
                 jsparkSession = self._jvm.SparkSession(self._jsc.sc())

Review comment:
       LGTM with a couple of nits: @AngersZhuuuu,
   
   - Can we actually leverage existing constructor on `SparkSession` to pass 
the initial options instead of manually? Here unlike Scala, it initiates 
`sharedState` always. I think it's best to keep the code path matched.
   - Another nit is that: It's always preferred to use less Py4J connections 
which exposes potential flakiness. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to