You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "liu ming (JIRA)" <ji...@apache.org> on 2017/10/11 03:00:00 UTC

[jira] [Updated] (TRAFODION-1165) LP Bug: 1443482 - Accessing hive table with ucs2 encoded field returns 0 rows.

     [ https://issues.apache.org/jira/browse/TRAFODION-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

liu ming updated TRAFODION-1165:
--------------------------------
    Fix Version/s:     (was: 2.2-incubating)
                   2.3-incubating

> LP Bug: 1443482 - Accessing hive table with ucs2 encoded field returns 0 rows.
> ------------------------------------------------------------------------------
>
>                 Key: TRAFODION-1165
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1165
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-exe
>            Reporter: Howard Qin
>            Assignee: liu ming
>              Labels: hive
>             Fix For: 2.3-incubating
>
>
> When accessing hive table with ucs2 encoded field, our implementation will return 0 rows.
> This is caused by using of “strchr()”, see ExHdfsScanTcb::extractAndTransformAsciiSourceToSqlRow(), 
> strchr() returns at ‘\0’ before hit line delimiter ‘\n’, however the '\0' may just be a 0x00 part of ucs2 character, and the line is considered invalid.
> Scripts to reproduce:
> create table sck(
>     userId int not null, 
>     name varchar(20) character set UCS2 
> );
> insert into sck values (1001,  _ucs2'JBL'), (1002, _ucs2'YS '), (1003, _ucs2'8#RTG');
> unload into '/ucs2test' select * from sck;
> create external table hsck
> (
>   id int,
>   name string
> ) row format delimited fields terminated by '|' 
> location '/ucs2test';
> select * from hive.hive.hsck;
> Assigned to LaunchPad User khaled Bouaziz



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)