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

xiebin commented on ORC-1473:
-----------------------------

I have fixed these bugs and please review pr

> 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
>            Priority: Major
>
> 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