You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Csaba Ringhofer (Jira)" <ji...@apache.org> on 2021/06/16 14:29:00 UTC
[jira] [Created] (IMPALA-10753) Incorrect length when multiple
CHAR(N) values are inserted
Csaba Ringhofer created IMPALA-10753:
----------------------------------------
Summary: Incorrect length when multiple CHAR(N) values are inserted
Key: IMPALA-10753
URL: https://issues.apache.org/jira/browse/IMPALA-10753
Project: IMPALA
Issue Type: Bug
Components: Frontend
Reporter: Csaba Ringhofer
To reproduce:
{code}
CREATE TABLE impala_char_insert (s STRING);
-- all values are CHAR(N) with different N, but all will use the biggest N
INSERT OVERWRITE impala_char_insert VALUES (CAST("1" AS CHAR(1))), (CAST("12" AS CHAR(2))), (CAST("123" AS CHAR(3)));
SELECT length(s) FROM impala_char_insert;
results:
3
3
3
-- inserting the same values in separate INSERTs works correctly
INSERT OVERWRITE impala_char_insert VALUES (CAST("1" AS CHAR(1)));
INSERT INTO impala_char_insert VALUES (CAST("12" AS CHAR(2)));
INSERT INTO impala_char_insert VALUES (CAST("123" AS CHAR(3)));
SELECT length(s) FROM impala_char_insert;
results:
1
2
3
-- if one value is not CHAR(N), then the lengths are correct
INSERT OVERWRITE impala_char_insert VALUES (CAST("1" AS CHAR(1))), (CAST("12" AS VARCHAR(2))), (CAST("123" AS CHAR(3)));
SELECT length(s) FROM impala_char_insert;
results:
1
2
3
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)