You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2016/05/02 07:45:37 UTC

[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

GitHub user gatorsmile opened a pull request:

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

    [SPARK-15056] [SQL] Parse Unsupported Sampling Syntax and Issue Better Exceptions

    #### What changes were proposed in this pull request?
    Compared with the current Spark parser, there are two extra syntax are supported in Hive for sampling
    - In `On` clauses, `rand()` is used for indicating sampling on the entire row instead of an individual column. For example, 
    
       ```SQL
       SELECT * FROM source TABLESAMPLE(BUCKET 3 OUT OF 32 ON rand()) s;
       ```
    - Users can specify the total length to be read. For example, 
    
       ```SQL
       SELECT * FROM source TABLESAMPLE(100M) s;
       ```
    
    Below is the link for references:
       https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Sampling
    
    This PR is to parse and capture these two extra syntax, and issue a better error message.
    
    #### How was this patch tested?
    Added test cases to verify the thrown exceptions

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

    $ git pull https://github.com/gatorsmile/spark bucketOnRand

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

    https://github.com/apache/spark/pull/12838.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 #12838
    
----

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216681806
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216660958
  
    **[Test build #57667 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57667/consoleFull)** for PR 12838 at commit [`5b8a848`](https://github.com/apache/spark/commit/5b8a8488faa40d2a983562194009caff99520729).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216272879
  
    **[Test build #57533 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57533/consoleFull)** for PR 12838 at commit [`5b8a848`](https://github.com/apache/spark/commit/5b8a8488faa40d2a983562194009caff99520729).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216681808
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57667/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216163122
  
    **[Test build #57519 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57519/consoleFull)** for PR 12838 at commit [`56b1d32`](https://github.com/apache/spark/commit/56b1d327f85d07aacf36d0dfeaa1db0f454979ad).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216163533
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12838#discussion_r61727187
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala ---
    @@ -655,8 +655,13 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with Logging {
             val fraction = ctx.percentage.getText.toDouble
             sample(fraction / 100.0d)
     
    +      case SqlBaseParser.BYTELENGTH_LITERAL =>
    +        throw new ParseException(
    +          "TABLESAMPLE(BUCKET byteLengthLiteral) is not supported", ctx)
    --- End diff --
    
    BUCKET? It is a bytetype literal right?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216667955
  
    LGTM


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216668974
  
    merging to master/2.0 thanks


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12838#discussion_r61727012
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ---
    @@ -920,6 +921,10 @@ TINYINT_LITERAL
         : DIGIT+ 'Y'
         ;
     
    +BYTELENGTH_LITERAL
    +    : DIGIT+ ('b' | 'B' | 'k' | 'K' | 'm' | 'M' | 'g' | 'G')
    --- End diff --
    
    The lexer is case insensitive so we don't need to add both lower and upper case characters. Just keep the uppercase ones (for consistency).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216660799
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12838#discussion_r61752173
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala ---
    @@ -655,8 +655,13 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with Logging {
             val fraction = ctx.percentage.getText.toDouble
             sample(fraction / 100.0d)
     
    +      case SqlBaseParser.BYTELENGTH_LITERAL =>
    +        throw new ParseException(
    +          "TABLESAMPLE(BUCKET byteLengthLiteral) is not supported", ctx)
    +
           case SqlBaseParser.BUCKET if ctx.ON != null =>
    -        throw new ParseException("TABLESAMPLE(BUCKET x OUT OF y ON id) is not supported", ctx)
    +        throw new ParseException(
    +          "TABLESAMPLE(BUCKET x OUT OF y ON colname/rand()) is not supported", ctx)
    --- End diff --
    
    Yeah, will do. Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216661145
  
    @hvanhovell Could you please check if the code changes are appropriate? Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12838#discussion_r61752250
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ---
    @@ -920,6 +921,10 @@ TINYINT_LITERAL
         : DIGIT+ 'Y'
         ;
     
    +BYTELENGTH_LITERAL
    +    : DIGIT+ ('b' | 'B' | 'k' | 'K' | 'm' | 'M' | 'g' | 'G')
    --- End diff --
    
    Thanks! Do it now. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216163534
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57519/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216294617
  
    **[Test build #57533 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57533/consoleFull)** for PR 12838 at commit [`5b8a848`](https://github.com/apache/spark/commit/5b8a8488faa40d2a983562194009caff99520729).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216294975
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216717881
  
    Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12838#discussion_r61752215
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala ---
    @@ -655,8 +655,13 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with Logging {
             val fraction = ctx.percentage.getText.toDouble
             sample(fraction / 100.0d)
     
    +      case SqlBaseParser.BYTELENGTH_LITERAL =>
    +        throw new ParseException(
    +          "TABLESAMPLE(BUCKET byteLengthLiteral) is not supported", ctx)
    --- End diff --
    
    : ) Yeah!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216681545
  
    **[Test build #57667 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57667/consoleFull)** for PR 12838 at commit [`5b8a848`](https://github.com/apache/spark/commit/5b8a8488faa40d2a983562194009caff99520729).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216294977
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57533/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12838#issuecomment-216125222
  
    **[Test build #57519 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57519/consoleFull)** for PR 12838 at commit [`56b1d32`](https://github.com/apache/spark/commit/56b1d327f85d07aacf36d0dfeaa1db0f454979ad).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15056] [SQL] Parse Unsupported Sampling...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12838#discussion_r61728670
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala ---
    @@ -655,8 +655,13 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with Logging {
             val fraction = ctx.percentage.getText.toDouble
             sample(fraction / 100.0d)
     
    +      case SqlBaseParser.BYTELENGTH_LITERAL =>
    +        throw new ParseException(
    +          "TABLESAMPLE(BUCKET byteLengthLiteral) is not supported", ctx)
    +
           case SqlBaseParser.BUCKET if ctx.ON != null =>
    -        throw new ParseException("TABLESAMPLE(BUCKET x OUT OF y ON id) is not supported", ctx)
    +        throw new ParseException(
    +          "TABLESAMPLE(BUCKET x OUT OF y ON colname/rand()) is not supported", ctx)
    --- End diff --
    
    Message is slightly confusing if user is passing in anything other than rand. How about two error messages? One for column and one for function.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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