HyukjinKwon commented on a change in pull request #35410:
URL: https://github.com/apache/spark/pull/35410#discussion_r804365905
##########
File path: python/pyspark/sql/context.py
##########
@@ -718,10 +715,10 @@ def __init__(self, sparkContext: SparkContext,
jhiveContext: Optional[JavaObject
sparkContext._conf.set( # type: ignore[attr-defined]
"spark.sql.catalogImplementation", "hive"
)
- sparkSession =
SparkSession.builder._sparkContext(sparkContext).getOrCreate()
- else:
- sparkSession = SparkSession(sparkContext,
jhiveContext.sparkSession())
Review comment:
`spark.sql.catalogImplementation` is a static configuration that can
only be set for the root parent Spark session. Therefore, we can just get the
any active child Spark session. It doesn't have to be the Spark session in
`HiveContext`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]