cloud-fan commented on a change in pull request #25771: [SPARK-28970][SQL] Implement USE CATALOG/NAMESPACE for Data Source V2 URL: https://github.com/apache/spark/pull/25771#discussion_r328958183
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceResolution.scala ########## @@ -393,4 +407,13 @@ case class DataSourceResolution( nullable = true, builder.build()) } + + private def validateCatalog(catalogName: String): CatalogPlugin = { + try { + catalogManager.catalog(catalogName) + } catch { + case _: CatalogNotFoundException => Review comment: Seems it's OK to just throw `CatalogNotFoundException` here. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org