Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
ghx-label-11
Description
To reproduce:
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