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 "Michael Smith (Jira)" <ji...@apache.org> on 2023/09/11 18:14:00 UTC
[jira] [Commented] (IMPALA-10086) SqlCastException when comparing char with varchar
[ https://issues.apache.org/jira/browse/IMPALA-10086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17763857#comment-17763857 ]
Michael Smith commented on IMPALA-10086:
----------------------------------------
Regression for anyone upgrading from Impala 3.2.0.
> SqlCastException when comparing char with varchar
> -------------------------------------------------
>
> Key: IMPALA-10086
> URL: https://issues.apache.org/jira/browse/IMPALA-10086
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Affects Versions: Impala 4.0.0, Impala 3.3.0
> Reporter: Tim Armstrong
> Assignee: Michael Smith
> Priority: Critical
> Labels: newbie, ramp-up
>
> {noformat}
> [localhost:21000] default> select 'expected 2',count(*) from ax where cast(t as string) = cast('a ' as varchar(10));
> +--------------+----------+
> | 'expected 2' | count(*) |
> +--------------+----------+
> | expected 2 | 2 |
> +--------------+----------+
> Fetched 1 row(s) in 0.44s
> [localhost:21000] default> create table chartbl (c char(10));
> +-------------------------+
> | summary |
> +-------------------------+
> | Table has been created. |
> +-------------------------+
> Fetched 1 row(s) in 0.23s
> [localhost:21000] default> select * from chartbl where c = cast('test' as varchar(10));
> ERROR: SqlCastException: targetType=VARCHAR(*) type=VARCHAR(10)
> {noformat}
> Also using the functional dataset:
> {noformat}
> [localhost:21000] functional> select * from chars_tiny where cs = vc;
> ERROR: SqlCastException: targetType=VARCHAR(*) type=VARCHAR(5)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org