dongjoon-hyun commented on a change in pull request #25372: [SPARK-28640][SQL]
Only give warning when session catalog is not defined
URL: https://github.com/apache/spark/pull/25372#discussion_r312719791
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalog/v2/LookupCatalog.scala
##########
@@ -62,6 +62,9 @@ trait LookupCatalog extends Logging {
try {
Some(lookupCatalog(SESSION_CATALOG_NAME))
} catch {
+ case _: CatalogNotFoundException =>
+ logWarning("Session catalog is not defined")
+ None
Review comment:
Could you print out more information of `CatalogNotFoundException`?
Without that, previous error message is better for users because it gives
the exact reason `Cannot find catalog plugin class for catalog 'session': xxx`.
```
$ bin/spark-shell --conf spark.sql.catalog.session=xxx
scala> spark.sessionState.analyzer.sessionCatalog
19/08/10 18:17:29 ERROR HiveSessionStateBuilder$$anon$1: Cannot load v2
session catalog
org.apache.spark.SparkException: Cannot find catalog plugin class for
catalog 'session': xxx
```
----------------------------------------------------------------
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]