cloud-fan commented on a change in pull request #26923: [SPARK-30284][SQL]
CREATE VIEW should keep the current catalog and namespace
URL: https://github.com/apache/spark/pull/26923#discussion_r362370624
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala
##########
@@ -368,7 +388,27 @@ case class CatalogTable(
}
object CatalogTable {
+ // Starting from Spark 3.0, we don't use this property any more.
`VIEW_CATALOG_AND_NAMESPACE` is
+ // used instead.
val VIEW_DEFAULT_DATABASE = "view.default.database"
+
+ val VIEW_CATALOG_AND_NAMESPACE = "view.catalogAndNamespace.numParts"
+ val VIEW_CATALOG_AND_NAMESPACE_PART_PREFIX = "view.catalogAndNamespace.part."
+ // Convert the current catalog and namespace to properties.
+ def catalogAndNamespaceToProps(
+ currentCatalog: String,
+ currentNamespace: Seq[String]): Map[String, String] = {
+ val props = new mutable.HashMap[String, String]
+ val parts = currentCatalog +: currentNamespace
+ if (parts.nonEmpty) {
Review comment:
AFAIK, it's because hive metastore has a size limitation for a single
property, so we try to avoid putting everything into one property.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]