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

    https://github.com/apache/spark/pull/15423#discussion_r83771158
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala ---
    @@ -168,17 +168,7 @@ class SparkSqlAstBuilder(conf: SQLConf) extends 
AstBuilder {
        * }}}
        */
       override def visitShowColumns(ctx: ShowColumnsContext): LogicalPlan = 
withOrigin(ctx) {
    -    val table = visitTableIdentifier(ctx.tableIdentifier)
    -
    -    val lookupTable = Option(ctx.db) match {
    -      case None => table
    -      case Some(db) if table.database.exists(_ != db) =>
    -        operationNotAllowed(
    -          s"SHOW COLUMNS with conflicting databases: '$db' != 
'${table.database.get}'",
    -          ctx)
    -      case Some(db) => TableIdentifier(table.identifier, Some(db.getText))
    -    }
    -    ShowColumnsCommand(lookupTable)
    +    ShowColumnsCommand(Option(ctx.db).map(_.getText), 
visitTableIdentifier(ctx.tableIdentifier))
    --- End diff --
    
    I have no strong option towards this. From my point, MySQL's way might be 
little confusing users if they don't notice the database name is different.


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