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