GitHub user dongjoon-hyun opened a pull request:

    https://github.com/apache/spark/pull/15640

    [SPARK-18106][SQL] ANALYZE TABLE should raise a ParseException for invalid 
option

    ## What changes were proposed in this pull request?
    
    Currently, `ANALYZE TABLE` command accepts `identifier` for option 
`NOSCAN`. This PR raises a ParseException for unknown option.
    
    **Before**
    ```scala
    scala> sql("create table test(a int)")
    res0: org.apache.spark.sql.DataFrame = []
    
    scala> sql("analyze table test compute statistics blah")
    res1: org.apache.spark.sql.DataFrame = []
    ```
    
    **After**
    ```scala
    scala> sql("create table test(a int)")
    res0: org.apache.spark.sql.DataFrame = []
    
    scala> sql("analyze table test compute statistics blah")
    org.apache.spark.sql.catalyst.parser.ParseException:
    Expected `NOSCAN` instead of `blah`(line 1, pos 0)
    ```
    
    ## How was this patch tested?
    
    Pass the Jenkins test with a new test case.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dongjoon-hyun/spark SPARK-18106

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/15640.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #15640
    
----
commit 4819dd147114ce50b388a1385ebb7119097c9beb
Author: Dongjoon Hyun <[email protected]>
Date:   2016-10-26T04:54:34Z

    [SPARK-18106][SQL] ANALYZE TABLE should raise a ParseException for invalid 
option

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to