hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aihua Xu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-11129) Issue a warning when copied from UTF-8 to ISO 8859-1
Date Thu, 02 Jul 2015 13:39:04 GMT

    [ https://issues.apache.org/jira/browse/HIVE-11129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14611959#comment-14611959
] 

Aihua Xu commented on HIVE-11129:
---------------------------------

[~szehon] Can you take a look at this patch? It's a simple fix to add a warning when converting
between UTF-8 and other charset which could lead to some data not convertable. Do you think
it's reasonable to add that?

> Issue a warning when copied from UTF-8 to ISO 8859-1
> ----------------------------------------------------
>
>                 Key: HIVE-11129
>                 URL: https://issues.apache.org/jira/browse/HIVE-11129
>             Project: Hive
>          Issue Type: Bug
>          Components: File Formats
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>             Fix For: 2.0.0
>
>         Attachments: HIVE-11129.patch
>
>
> Copying data from a table using UTF-8 encoding to one using ISO 8859-1 encoding causes
data corruption without warning.
> {noformat}
> CREATE TABLE person_utf8 (name STRING)
> ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' 
> WITH SERDEPROPERTIES ('serialization.encoding'='UTF8');
> {noformat}
> Put the following data in the table:
> Müller,Thomas
> Jørgensen,Jørgen
> Vega,Andrés
> 中村,浩人
> אביה,נועם
> {noformat}
> CREATE TABLE person_2 ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'

> WITH SERDEPROPERTIES ('serialization.encoding'='ISO8859_1')
> AS select * from person_utf8;
> {noformat}
> expected to get mangled data but we should give a warning. 



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

Mime
View raw message