Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11991#discussion_r57644828
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkQl.scala ---
    @@ -369,13 +369,33 @@ private[sql] class SparkQl(conf: ParserConf = 
SimpleParserConf()) extends Cataly
           case Token("TOK_CLEARCACHE", Nil) =>
             ClearCacheCommand
     
    +      // SHOW TABLES [(IN|FROM) database_name] 
['identifier_with_wildcards']
           case Token("TOK_SHOWTABLES", args) =>
    -        val databaseName = args match {
    -          case Nil => None
    -          case Token("TOK_FROM", Token(dbName, Nil) :: Nil) :: Nil => 
Option(dbName)
    +        // Parses the following conditions
    +        // 1. SHOW TABLES
    +        // 2. SHOW TABLES FROM database 'table_pattern'
    +        // 3. SHOW TABLES FROM database
    --- End diff --
    
    why accept `FROM`? It seems kind of weird. Hive doesn't do this either: 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-ShowTables


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to