Github user xwu0226 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13088#discussion_r63134583
  
    --- Diff: repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala 
---
    @@ -88,7 +88,8 @@ object Main extends Logging {
         }
     
         val builder = SparkSession.builder.config(conf)
    -    if (SparkSession.hiveClassesArePresent) {
    +    if (conf.getBoolean("spark.user.hive.catalog", true)
    --- End diff --
    
    Right now from the repl/Main.scala level, the way to generate a 
sparkSession with hive catalog is checking 
`SparkSession.hiveClassesArePresent`, which checks for the classes for 
`HiveSharedState` and `HiveSessionState`.  If these classes are built, repl 
will always start sparkSession that uses hive catalog.  In order for repl to 
use InMemoryCatalog, we need to go the else code path of the code 
    ```
    if (conf.getBoolean("spark.use.hive.catalog", true)
          && SparkSession.hiveClassesArePresent) {
          sparkSession = builder.enableHiveSupport().getOrCreate()
          logInfo("Created Spark session with Hive support")
        } else {
          sparkSession = builder.getOrCreate()
          logInfo("Created Spark session")
        }
    ```
    I think the default value for the `CATALOG_IMPLEMENTATION` is `in-memory`. 
But maybe I can put this key `spark.sql.catalogImplementation` in the 
spark-defaults.conf ?
    Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to