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

Zheng Shao commented on HIVE-136:
---------------------------------

1. The code does allow ROW SEPARATOR to be different from '\n';

2. For deserialization, we might deserialize from user-generated data (data 
generated outside of hive). If that data do escape a single back-slash to be 
double back-slashes, then 

Basically the principle of escaping in the serialization phase is to escape as 
less as possible, so in most cases, the user does not need to care about 
escaping when reading the data (if the data do not contain these special 
characters). And if the user does do unescaping, he just needs to follow the 
steps in the deserialization mentioned above - without considering what is the 
actual column separator.

The principle of unescaping in the deserialization phase is to unescape as much 
as possible (well, if the user writes single backslash to be double backslash, 
then the only reason that there is still single backslash in the file is 
because user escaped something.) This also helps the user in that his escaping 
code does not need to be changed for different column separators.



> SerDe should escape some special characters
> -------------------------------------------
>
>                 Key: HIVE-136
>                 URL: https://issues.apache.org/jira/browse/HIVE-136
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Serializers/Deserializers
>            Reporter: Zheng Shao
>            Priority: Critical
>
> MetadataTypedColumnsetSerDe and DynamicSerDe should escape some special 
> characters like '\n' or the column/item/key separator.
> Otherwise the data will look corrupted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to