jzhuge opened a new pull request #25372: [SPARK-28640][SQL] Only give warning 
when session catalog is not defined
URL: https://github.com/apache/spark/pull/25372
 
 
   ## What changes were proposed in this pull request?
   
   LookupCatalog.sessionCatalog logs an error message and the exception stack 
upon any nonfatal exception.
   When session catalog is not defined, this may alarm the user unnecessarily.
   It should be enough to give a warning and return None.
   
   ## How was this patch tested?
   
   Manually run `spark.sessionState.analyzer.sessionCatalog` in Spark shell,
   expect a warning, not an error and a stack trace.
   ```
   scala> spark.sessionState.analyzer.sessionCatalog
   2019-08-06 15:43:23,068 WARN  [main] hive.HiveSessionStateBuilder$$anon$1 
(Logging.scala:logWarning(69)) - Session catalog is not defined
   res1: Option[org.apache.spark.sql.catalog.v2.CatalogPlugin] = None
   ```

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

Reply via email to