[
https://issues.apache.org/jira/browse/HIVE-12820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15094643#comment-15094643
]
Chaoyu Tang commented on HIVE-12820:
------------------------------------
Will there be any problem in code of LazyUtil.writeEscaped if the escapeChar
itself is '\n' or '\r'?
{code}
out.write(escapeChar);
if (bytes[i] == '\r') {
out.write('r');
start = i + 1;
} else if (bytes[i] == '\n') {
out.write('n');
start = i + 1;
} else {
// the current char will be written out later.
start = i;
}
{code}
It is going to introduce an additional carriage return or new line in the data,
am I right?
> Remove the check if carriage return and new line are used for separator or
> escape character
> -------------------------------------------------------------------------------------------
>
> Key: HIVE-12820
> URL: https://issues.apache.org/jira/browse/HIVE-12820
> Project: Hive
> Issue Type: Bug
> Components: Query Processor
> Affects Versions: 2.0.0, 2.1.0
> Reporter: Aihua Xu
> Assignee: Aihua Xu
> Attachments: HIVE-12820.2.patch, HIVE-12820.patch
>
>
> The change in HIVE-11785 doesn't allow \r or \n to be used as separator or
> escape character which may break some existing tables which uses \r as
> separator or escape character e.g..
> This case actually can be supported regardless of SERIALIZATION_ESCAPE_CRLF
> set or not.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)