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

    https://github.com/apache/spark/pull/14897#discussion_r82493591
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala ---
    @@ -94,6 +69,47 @@ private[sql] class SharedState(val sparkContext: 
SparkContext) extends Logging {
       }
     
       /**
    +   * Class for caching query results reused in future executions.
    +   */
    +  val cacheManager: CacheManager = new CacheManager
    +
    +  /**
    +   * A listener for SQL-specific 
[[org.apache.spark.scheduler.SparkListenerEvent]]s.
    +   */
    +  val listener: SQLListener = createListenerAndUI(sparkContext)
    +
    +  /**
    +   * A catalog that interacts with external systems.
    +   */
    +  val externalCatalog: ExternalCatalog =
    +    SharedState.reflect[ExternalCatalog, SparkConf, Configuration](
    +      SharedState.externalCatalogClassName(sparkContext.conf),
    +      sparkContext.conf,
    +      sparkContext.hadoopConfiguration)
    +
    +  /**
    +   * A manager for global temporary views.
    +   */
    +  val globalTempViewManager = {
    +    // System preserved database should not exists in metastore. However 
it's hard to guarantee it
    +    // for every session, because case-sensitivity differs. Here we always 
lowercase it to make our
    +    // life easier.
    +    val globalTempDB = 
sparkContext.conf.get(GLOBAL_TEMP_DATABASE).toLowerCase
    +    if (externalCatalog.databaseExists(globalTempDB)) {
    +      throw new SparkException(
    +        s"$globalTempDB is a system preserved database, please rename your 
existing database " +
    +          "to resolve the name conflict and launch your Spark application 
again.")
    --- End diff --
    
    Should we also mention this conf?


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