imback82 commented on issue #25771: [SPARK-28970][SQL] Implement USE CATALOG/NAMESPACE for Data Source V2 URL: https://github.com/apache/spark/pull/25771#issuecomment-532975834 @cloud-fan I noticed that three hive-thriftserver related tests were failing after this change because of `SELECT current_database()`. Basically it was getting current database from `SessionCatalog` directly. https://github.com/apache/spark/blob/c1bb3316bd7e992897ebb48f7f648194db4d06f1/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/finishAnalysis.scala#L81-L85 The fix is to use the `currentNamespace` from `CatalogManager`, but I wasn't sure what the best way to pass the `CatalogManger` around. I can just change `Optimizer` to take in `CatalogManager` instead of `SessionCatalog`. What do you think?
---------------------------------------------------------------- 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]
