AngersZhuuuu commented on a change in pull request #31680:
URL: https://github.com/apache/spark/pull/31680#discussion_r584469068



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
##########
@@ -946,7 +946,11 @@ object SparkSession extends Logging {
           SparkContext.getOrCreate(sparkConf)
           // Do not update `SparkConf` for existing `SparkContext`, as it's 
shared by all sessions.
         }
-
+        // We should reset `spark.sql.catalogImplementation` according to 
current requirement.
+        if (sparkContext.conf.get(CATALOG_IMPLEMENTATION) == "in-memory" &&
+          sparkConf.get(CATALOG_IMPLEMENTATION) == "hive") {

Review comment:
       > What if `sparkContext.conf.get(CATALOG_IMPLEMENTATION) == "hive" && 
sparkConf.get(CATALOG_IMPLEMENTATION) == "in-memory"`?
   
   I think if `sparkContext.conf.get(CATALOG_IMPLEMENTATION) == "hive"`, I 
think user have set this before start SparkSession.
   
   And we have a method `HiveUtils. withHiveExternalCatalog` we should respect 
this too ==




----------------------------------------------------------------
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