kbendick commented on pull request #756:
URL: https://github.com/apache/orc/pull/756#issuecomment-886999110


   > > Are we sure that the buffers / InputStreams passed to readFully do not 
contain data after their usage?
   > 
   > In this context, the "readFully" refers to the the buffer that is passed 
in, not that the `InputStream` itself is read fully. That is, the buffer is 
fully populated (unless EOF is seen first). The typical `read` function of 
`InputStream` can return any number of bytes, so you have to be able to handle 
that, and continuously loop to extract enough data to fully fill the buffer.
   
   Ah I misspoke. I was indeed referring to the passed in buffers. That's what 
I get for reviewing code really late at night.
   
   Looking at it with fresher eyes, it does in fact look like there is no 
behavioral change between the two. My actual concern was that the buffers 
passed in were not necessarily intended to be read from the beggining / their 
current location / mark (and hence the offset parameter). That was my actual 
concern. But seeing where the code had to be changed, it doesn't appear as 
though anywhere it's used the offset is anything but zero, so this is 
functionally the same.
   
   Thanks @belugabehr!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to