[ 
https://issues.apache.org/jira/browse/ORC-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dongjoon Hyun closed ORC-1473.
------------------------------

> Zero-copy zeroCopyReadRanges and releaseBuffer bugs
> ---------------------------------------------------
>
>                 Key: ORC-1473
>                 URL: https://issues.apache.org/jira/browse/ORC-1473
>             Project: ORC
>          Issue Type: Bug
>          Components: Java, Reader
>            Reporter: xiebin
>            Assignee: xiebin
>            Priority: Major
>             Fix For: 2.0.0
>
>
> I found two bugs
>  # org.apache.orc.impl.RecordReaderUtils#zeroCopyReadRanges
> {code:java}
> ByteBuffer copy = currentBuffer.duplicate();
> copy.position((int) (current.getOffset() - currentOffset)); {code}
> if currentBuffer position is not 0, copy.position() will set a uncorrect 
> position.
> I think we should use slice() replace duplicate().
>  # org.apache.orc.impl.ZeroCopyShims.ZeroCopyAdapter#releaseBuffer
> The parameter `buffer` is not the original buffer from hdfs reading. It is 
> the slice or duplicate of the original buffer.
> This bug is reported at ORC-700.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to