You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Gang Wu (JIRA)" <ji...@apache.org> on 2018/10/09 07:09:00 UTC
[jira] [Updated] (ORC-412) [C++] ORC: Char(n) and Varchar(n)
writers truncate to n bytes & corrupts multi-byte data
[ https://issues.apache.org/jira/browse/ORC-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gang Wu updated ORC-412:
------------------------
Fix Version/s: (was: 1.6.0)
> [C++] ORC: Char(n) and Varchar(n) writers truncate to n bytes & corrupts multi-byte data
> ----------------------------------------------------------------------------------------
>
> Key: ORC-412
> URL: https://issues.apache.org/jira/browse/ORC-412
> Project: ORC
> Issue Type: Bug
> Affects Versions: 1.5.2
> Reporter: Gang Wu
> Assignee: Gang Wu
> Priority: Major
>
> https://github.com/apache/orc/blob/master/java/core/src/java/org/apache/orc/impl/writer/CharTreeWriter.java#L41
> {code}
> itemLength = schema.getMaxLength();
> padding = new byte[itemLength];
> }
> {code}
> https://github.com/apache/orc/blob/master/java/core/src/java/org/apache/orc/impl/writer/VarcharTreeWriter.java#L48
> {code}
> if (vector.noNulls || !vector.isNull[0]) {
> int itemLength = Math.min(vec.length[0], maxLength);
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)