AngersZhuuuu commented on pull request #31680:
URL: https://github.com/apache/spark/pull/31680#issuecomment-787463830


   > > When SparkContext is initialed, if we want to start SparkSession, when 
we call `SparkSession.builder.enableHiveSupport().getOrCreate()`, the 
SparkSession we created won't have hive support
   > 
   > Is it true? In this case `enableHiveSupport` will add 
`spark.sql.catalogImplementation` to the initial configs for `SparkSession` and 
`SharedState`. And then, the config will be populated in the cloned SparkConf 
of `SharedState`, which is used to init the externalCatalog.
   
   But sessionStated is initialed according to SparkContext's conf
   ```
     lazy val sessionState: SessionState = {
       parentSessionState
         .map(_.clone(this))
         .getOrElse {
           val state = SparkSession.instantiateSessionState(
             SparkSession.sessionStateClassName(sparkContext.conf),
             self,
             initialSessionOptions)
           state
         }
     }
   ```


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to