[
https://issues.apache.org/jira/browse/SPARK-38650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17512126#comment-17512126
]
Apache Spark commented on SPARK-38650:
--------------------------------------
User 'anchovYu' has created a pull request for this issue:
https://github.com/apache/spark/pull/35966
> Better ParseException message for char without length
> -----------------------------------------------------
>
> Key: SPARK-38650
> URL: https://issues.apache.org/jira/browse/SPARK-38650
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.3.0
> Reporter: Xinyi Yu
> Priority: Major
>
> We support char and varchar types. But when users input the type without
> length, the message is confusing and not helpful at all:
> {code:sql}
> > SELECT cast('a' as CHAR)
> DataType char is not supported.(line 1, pos 19)
> == SQL ==
> SELECT cast('a' AS CHAR)
> -------------------^^^{code}
> This ticket would like to improve the error message for these special cases
> to:
> {code:java}
> Datatype char requires a length parameter, for example char(10). Please
> specify the length.{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]