You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "eugene liu (JIRA)" <ji...@apache.org> on 2016/06/09 19:38:20 UTC

[jira] [Created] (HIVE-13983) Unicode insert issue

eugene liu created HIVE-13983:
---------------------------------

             Summary: Unicode insert issue
                 Key: HIVE-13983
                 URL: https://issues.apache.org/jira/browse/HIVE-13983
             Project: Hive
          Issue Type: Bug
          Components: HiveServer2
    Affects Versions: 1.2.0
         Environment: failed in beeline and in odbc
            Reporter: eugene liu


Unicode  characters in UTF-8 on wire: ¿=C2 BF  «=C2 AB  é=C3 A9
Characters inserted using INSERT SELECT format stores the values correctly
Characters inserted using INSERT VALUES format stores the values incorrectly. Below was what I did in beeline:

DROP TABLE testch3;
CREATE TABLE testch3(col0 int, col1 CHAR(10), col2 VARCHAR(10), col3 string);
Insert into table testch3 select  1,'¿','«','é' from (select count(*) from testch3) qaz;
Insert into table testch3 values (2,'¿','«','é');
select * from testch3;

+---------------+---------------+---------------+---------------+
| testch3.col0  | testch3.col1  | testch3.col2  | testch3.col3  |
+---------------+---------------+---------------+---------------+
| 1             | ¿             | «             | é             |
| 2             | �             | �             | �             |
+---------------+---------------+---------------+---------------+
2 rows selected (0.251 seconds)




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)