Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/17433#discussion_r108113280
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
---
@@ -1259,28 +1255,13 @@ class SessionCatalog(
}
/**
- * Create a new [[SessionCatalog]] with the provided parameters.
`externalCatalog` and
- * `globalTempViewManager` are `inherited`, while `currentDb` and
`tempTables` are copied.
+ * Copy the current state of the catalog to another catalog.
*/
- def newSessionCatalogWith(
- conf: CatalystConf,
- hadoopConf: Configuration,
- functionRegistry: FunctionRegistry,
- parser: ParserInterface): SessionCatalog = {
- val catalog = new SessionCatalog(
- externalCatalog,
- globalTempViewManager,
- functionRegistry,
- conf,
- hadoopConf,
- parser)
-
+ private[sql] def copyStateTo(target: SessionCatalog): Unit = {
--- End diff --
So we have to synchronize on the source catalog (the target catalog is
thread-safe since it is not visible to the outside world yet), and I would like
to keep the locking internal to the source catalog. I will add some
explanation.
---
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]