You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2022/03/31 05:26:00 UTC
[jira] [Resolved] (SPARK-38650) Better ParseException message for char without length
[ https://issues.apache.org/jira/browse/SPARK-38650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan resolved SPARK-38650.
---------------------------------
Fix Version/s: 3.3.0
Resolution: Fixed
Issue resolved by pull request 35966
[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
> Assignee: Xinyi Yu
> Priority: Major
> Fix For: 3.3.0
>
>
> 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