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

ASF GitHub Bot commented on ORC-406:
------------------------------------

GitHub user t3rmin4t0r opened a pull request:

    https://github.com/apache/orc/pull/310

    ORC-406: First padded version with 3 failing tests

    This implementation always pads the CHAR() columns, which is undone by the 
reader codepath (causing the current failures).
    
    Will fix test-case when it is clear whether the padding is necessary or not.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/t3rmin4t0r/orc ORC-406

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/orc/pull/310.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #310
    
----
commit 8330bc77fc85573dd30c9f6ae5e401acb13ba44b
Author: Gopal V <gopalv@...>
Date:   2018-09-19T08:49:23Z

    ORC-406: First version with 3 failing tests

----


> ORC: Char(n) and Varchar(n) writers truncate to n bytes & corrupts multi-byte 
> data
> ----------------------------------------------------------------------------------
>
>                 Key: ORC-406
>                 URL: https://issues.apache.org/jira/browse/ORC-406
>             Project: ORC
>          Issue Type: Bug
>    Affects Versions: 1.5.2
>            Reporter: Gopal V
>            Assignee: Gopal V
>            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)

Reply via email to