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

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statements.scala
 ##########
 @@ -343,6 +343,15 @@ case class ShowTableStatement(
     partitionSpec: Option[TablePartitionSpec])
   extends ParsedStatement
 
+/**
+ * A SHOW VIEWS statement, as parsed from SQL.
+ */
+case class ShowViewsStatement(
 
 Review comment:
   A bit more background: SHOW TABLES has 2 versions: v1 command 
(`ShowTablesCommand`) and v2 command (`ShowTables`). That's why we need 
`ShowTablesStatement`, as we need to check some condition and convert it to 
either v1 or v2 command.
   
   SHOW VIEWS does not need a v1 command, so we only need a single v2 command
   ```
   case class ShowViews(namespace: LogicalPlan, pattern: Option[String]) ...
   ```
   and its corresponding physical plan `ShowViewsExec`.
   
   BTW we need to follow `ShowTables` and special-case the current namespace in 
the rule `ResolveNamespace`

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to