You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Michael Smith (Jira)" <ji...@apache.org> on 2022/05/25 16:24:00 UTC

[jira] [Closed] (IMPALA-11321) Cannot compare char to varchar

     [ https://issues.apache.org/jira/browse/IMPALA-11321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Smith closed IMPALA-11321.
----------------------------------
    Resolution: Duplicate

> Cannot compare char to varchar
> ------------------------------
>
>                 Key: IMPALA-11321
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11321
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 4.0.0
>            Reporter: Michael Smith
>            Priority: Major
>
> Running
> {code}
> create table varchar_1 (s varchar(1));
> create table char_1 (c char(1));
> insert into varchar_1 values (cast('a' as varchar(1)));
> insert into char_1 values (cast('a' as char(1)));
> select * from varchar_1 vc, char_1 ch where vc.s=ch.c;
> {code}
> results in
> {code}
> ERROR: SqlCastException: targetType=VARCHAR(*) type=VARCHAR(10)
> {code}
> Other SQL implementations allow this, and the comparison semantics seem clear.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)