You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/03/24 23:34:00 UTC

[jira] [Commented] (SPARK-38650) Better ParseException message for char without length

    [ 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org