Tim Armstrong created IMPALA-10086:
--------------------------------------

             Summary: 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
            Reporter: Tim Armstrong


{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.3.4#803005)

Reply via email to