Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/14897#discussion_r82536096
--- 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 --
oh no. I think it is fine to hide that conf. But, if the user hit this
exception, seems it is better to let them know there is another workaround
(renaming the existing db may not be easy).
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]