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

    https://github.com/apache/spark/pull/15640#discussion_r85163515
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala ---
    @@ -98,9 +98,10 @@ class SparkSqlAstBuilder(conf: SQLConf) extends 
AstBuilder {
        * }}}
        */
       override def visitAnalyze(ctx: AnalyzeContext): LogicalPlan = 
withOrigin(ctx) {
    -    if (ctx.partitionSpec == null &&
    -      ctx.identifier != null &&
    -      ctx.identifier.getText.toLowerCase == "noscan") {
    +    if (ctx.partitionSpec == null && ctx.identifier != null) {
    --- End diff --
    
    What if partition spec is not null ?
    What happens with something like 
    ```
    ANALYZE TABLE mytable PARTITION (a) garbage
    ```
    (Could you add a test for that ?)
    Maybe 
    ```
    if (ctx.identifier != null && ctx.identifier.getText.toLowerCase != 
"noscan") {
      throw new ParseException(s"Expected `NOSCAN` instead of 
`${ctx.identifier.getText}`", ctx)
    }
    ```
    could be moved to the top ?


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