[
https://issues.apache.org/jira/browse/HIVE-30155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Butao Zhang resolved HIVE-30155.
--------------------------------
Fix Version/s: Not Applicable
Assignee: Butao Zhang
Resolution: Duplicate
> Fix data corruption when using multi-byte line.delim with text format tables
> ----------------------------------------------------------------------------
>
> Key: HIVE-30155
> URL: https://issues.apache.org/jira/browse/HIVE-30155
> Project: Hive
> Issue Type: Bug
> Reporter: Butao Zhang
> Assignee: Butao Zhang
> Priority: Major
> Fix For: Not Applicable
>
>
> •
> Problem: HiveIgnoreKeyTextOutputFormat truncates multi-byte line.delim to its
> first byte via charAt(0), and TextInputFormat ignores line.delim entirely
> (splits on \n only), causing record misalignment and data loss for tables
> with multi-byte line delimiters such as \002\n.
> •
> Fix: Write full multi-byte delimiter bytes in
> HiveIgnoreKeyTextOutputFormat.getHiveRecordWriter(); propagate line.delim to
> textinputformat.record.delimiter in HiveInputFormat.getRecordReader() so
> Hadoop's LineRecordReader splits on the complete delimiter sequence.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)