GitHub user HyukjinKwon opened a pull request: https://github.com/apache/spark/pull/17784
[SPARK-20492][SQL] Do not print empty parentheses for invalid primitive types in parser ## What changes were proposed in this pull request? Currently, when the type string is invalid, it looks printing empty parentheses. This PR proposes a small improvement in an error message by removing it in the parse as below: ```scala spark.range(1).select($"col".cast("aa")) ``` **Before** ``` org.apache.spark.sql.catalyst.parser.ParseException: DataType aa() is not supported.(line 1, pos 0) == SQL == aa ^^^ ``` **After** ``` org.apache.spark.sql.catalyst.parser.ParseException: DataType aa is not supported.(line 1, pos 0) == SQL == aa ^^^ ``` ## How was this patch tested? Unit tests in `DataTypeParserSuite`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/HyukjinKwon/spark SPARK-20492 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/17784.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 #17784 ---- commit 896bdaf5627d841973abf4afb71bca12dd95a8d6 Author: hyukjinkwon <gurwls...@gmail.com> Date: 2017-04-27T14:49:57Z Do not print empty parentheses for invalid primitive types in parser ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org