[
https://issues.apache.org/jira/browse/SPARK-27170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16794194#comment-16794194
]
Wataru Yukawa commented on SPARK-27170:
---------------------------------------
[~dkbiswal]
Thank you for your comment!
I completely understood what you mean.
Actually, if I remember correctly, presto tries to comply with ansi sql.
Of course, if sparksql supports for ansi mode parsing, I think it would be
great.
Anyway, thanks!
> Better error message for syntax error with extraneous comma in the SQL parser
> -----------------------------------------------------------------------------
>
> Key: SPARK-27170
> URL: https://issues.apache.org/jira/browse/SPARK-27170
> Project: Spark
> Issue Type: Wish
> Components: SQL
> Affects Versions: 2.4.0
> Reporter: Wataru Yukawa
> Priority: Minor
>
> [~maropu], [~smilegator]
> It was great to talk with you in Hadoop / Spark Conference Japan 2019.
> Thanks in advance!
> I filed this issue which I talked with you at that time.
> We sometimes write a syntax error SQL with extraneous comma by mistake.
> For example, here is the SQL with an extraneous comma in line 2.
> {code}
> SELECT distinct
> ,a
> ,b
> ,c
> FROM ...' LIMIT 100
> {code}
> We have an error message in spark 2.4.0 but it's a little hard to understand
> in my feeling because line number is wrong.
> {code}
> cannot resolve '`distinct`' given input columns: [...]; line 1 pos 7;
> 'GlobalLimit 100
> +- 'LocalLimit 100
> +- 'Project ['distinct, ...]
> +- Filter (...)
> +- SubqueryAlias ...
> +- HiveTableRelation ...
> {code}
> By the way, here is the error message in prestosql 305 and same sql.
> Line number is correct and I guess an error message is better than sparksql.
> {code}
> line 2:5: mismatched input ','. Expecting: '*', <expression>, <identifier>
> {code}
> If sparksql error message improves, it would be great.
> Thanks.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]