You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Tim Armstrong (JIRA)" <ji...@apache.org> on 2018/10/30 17:26:00 UTC
[jira] [Updated] (IMPALA-1333) Missing implicit casts between
char/varchar/string.
[ https://issues.apache.org/jira/browse/IMPALA-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Armstrong updated IMPALA-1333:
----------------------------------
Issue Type: Improvement (was: Bug)
> Missing implicit casts between char/varchar/string.
> ---------------------------------------------------
>
> Key: IMPALA-1333
> URL: https://issues.apache.org/jira/browse/IMPALA-1333
> Project: IMPALA
> Issue Type: Improvement
> Components: Frontend
> Affects Versions: Impala 2.0, Impala 2.2, Impala 2.3.0
> Reporter: Lenni Kuff
> Priority: Minor
> Labels: sql-language, usability
>
> The following scenario needs to work:
> {code}
> create table vc (v varchar(10));
> insert into vc select 'a';
> ERROR: AnalysisException: Possible loss of precision for target table 'default.vc'.
> Expression ''a'' (type: STRING) would need to be cast to VARCHAR(10) for column 'v'
> {code}
> *Workaround*
> Use explicit casts.
> {code}
> Query: insert into vc select cast('a' as varchar(10))
> Inserted 1 row(s) in 0.32s
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org