dongjoon-hyun commented on a change in pull request #26513: [SPARK-29834][SQL]
DESC DATABASE should look up catalog like v2 commands
URL: https://github.com/apache/spark/pull/26513#discussion_r346554841
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -2899,6 +2899,21 @@ class AstBuilder(conf: SQLConf) extends
SqlBaseBaseVisitor[AnyRef] with Logging
}
}
+ /**
+ * Create a [[DescribeNamespaceStatement]].
+ *
+ * For example:
+ * {{{
+ * DESCRIBE DATABASE [EXTENDED] database;
+ * }}}
+ */
+ override def visitDescribeNamespace(ctx: DescribeNamespaceContext):
LogicalPlan =
+ withOrigin(ctx) {
+ DescribeNamespaceStatement(
+ visitMultipartIdentifier(ctx.multipartIdentifier()),
+ ctx.EXTENDED != null)
+ }
+
Review comment:
We had better move this to line 2543 to group the related functions.
-
https://github.com/apache/spark/blob/827cac1de70d233c08d7d052f59e1aa48f944e4f/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala#L2543
----------------------------------------------------------------
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]