You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/06/22 18:58:49 UTC

[GitHub] [spark] singhpk234 commented on a diff in pull request #36948: [SPARK-39547][SQL] V2SessionCatalog should not throw NoSuchDatabaseException in loadNamspaceMetadata

singhpk234 commented on code in PR #36948:
URL: https://github.com/apache/spark/pull/36948#discussion_r904129674


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalog.scala:
##########
@@ -244,7 +244,7 @@ class V2SessionCatalog(catalog: SessionCatalog)
 
   override def loadNamespaceMetadata(namespace: Array[String]): util.Map[String, String] = {
     namespace match {
-      case Array(db) =>
+      case Array(db) if catalog.databaseExists(db) =>
         catalog.getDatabaseMetadata(db).toMetadata

Review Comment:
   makes sense, we can certainly save a call in case db exists, made the changes, thanks!



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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