HyukjinKwon commented on a change in pull request #30042: URL: https://github.com/apache/spark/pull/30042#discussion_r506086362
########## File path: python/pyspark/sql/session.py ########## @@ -230,7 +230,10 @@ def __init__(self, sparkContext, jsparkSession=None): SparkSession._instantiatedSession = self SparkSession._activeSession = self self._jvm.SparkSession.setDefaultSession(self._jsparkSession) - self._jvm.SparkSession.setActiveSession(self._jsparkSession) + self._jvm.java.lang.Class.forName("org.apache.spark.sql.SparkSession$")\ Review comment: `Class.forName` should better not directly used. This is banned by Scala style: https://github.com/apache/spark/blob/e93b8f02cd706bedc47c9b55a73f632fe9e61ec3/scalastyle-config.xml#L197-L206 ---------------------------------------------------------------- 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. 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