cloud-fan commented on a change in pull request #27345: [SPARK-30624][SQL] JDBC
v2 with catalog functionalities
URL: https://github.com/apache/spark/pull/27345#discussion_r370237104
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -731,12 +731,11 @@ class Analyzer(
extends Rule[LogicalPlan] with LookupCatalog {
def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
case s @ ShowTables(UnresolvedNamespace(Seq()), _) =>
- s.copy(namespace =
- ResolvedNamespace(currentCatalog.asNamespaceCatalog,
catalogManager.currentNamespace))
+ s.copy(namespace = ResolvedNamespace(currentCatalog,
catalogManager.currentNamespace))
case UnresolvedNamespace(Seq()) =>
- ResolvedNamespace(currentCatalog.asNamespaceCatalog, Seq.empty[String])
Review comment:
We don't load the namespace metadata here and the catalog doesn't need to be
a namespace catalog. For example, SHOW TABLE is implemented by
`TableCatalog.listTables`, and is nothing to do with `SupportsNamespace`.
TODO: move it to a separate PR.
----------------------------------------------------------------
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]