maropu commented on a change in pull request #27897: [SPARK-31113][SQL] Add 
SHOW VIEWS command
URL: https://github.com/apache/spark/pull/27897#discussion_r392563262
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/DDLParserSuite.scala
 ##########
 @@ -1260,6 +1260,21 @@ class DDLParserSuite extends AnalysisTest {
         Some(Map("ds" -> "2008-04-09"))))
   }
 
+  test("show views") {
+    comparePlans(
+      parsePlan("SHOW VIEWS"),
+      ShowViewsStatement(UnresolvedNamespace(Seq.empty[String]), None))
+    comparePlans(
+      parsePlan("SHOW VIEWS FROM testcat.ns1.ns2.tbl"),
+      ShowViewsStatement(UnresolvedNamespace(Seq("testcat", "ns1", "ns2", 
"tbl")), None))
+    comparePlans(
+      parsePlan("SHOW VIEWS IN testcat.ns1.ns2.tbl"),
+      ShowViewsStatement(UnresolvedNamespace(Seq("testcat", "ns1", "ns2", 
"tbl")), None))
+    comparePlans(
+      parsePlan("SHOW VIEWS IN tbl LIKE '*dog*'"),
 
 Review comment:
   Plz add tests for the optional LIKE case? 
https://github.com/apache/spark/pull/27897/files#diff-8c1cb2af4aa1109e08481dae79052cc3R227

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