xiebin created ORC-1473:
---------------------------

             Summary: Zero-copy 
                 Key: ORC-1473
                 URL: https://issues.apache.org/jira/browse/ORC-1473
             Project: ORC
          Issue Type: Bug
          Components: Java, Reader
            Reporter: xiebin


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