imback82 commented on a change in pull request #25747: [SPARK-29039][SQL]
centralize the catalog and table lookup logic
URL: https://github.com/apache/spark/pull/25747#discussion_r323009111
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalog/v2/LookupCatalog.scala
##########
@@ -99,6 +99,21 @@ trait LookupCatalog extends Logging {
}
}
+ object CatalogAndRestNameParts {
+ def unapply(nameParts: Seq[String]): Some[(Option[CatalogPlugin],
Seq[String])] = {
+ if (nameParts.isEmpty) {
+ Some((defaultCatalog, Nil))
Review comment:
Shouldn't we introduce `currentCatalog` in `CatalogManager` and use it
instead of `defaultCatalog` as @rdblue suggested? I was thinking doing
something like the following:
https://github.com/apache/spark/compare/master...imback82:current_ns
----------------------------------------------------------------
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]