Wataru Yukawa created SPARK-27170: ------------------------------------- Summary: 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
[~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: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org