westonpace commented on PR #41801:
URL: https://github.com/apache/arrow/pull/41801#issuecomment-2129441609

   > FWIW a streaming IPC decoder is included in the next arrow release - 
https://github.com/apache/arrow-rs/pull/5531
   
   Cool :tada: 
   
   I think I understand now.  I take back my earlier point.  To add the 
equivalent feature in C++ would be to update the following method in the 
`arrow::io::Readable` interface:
   
   ```
     /// \brief Read data from current file position.
     ///
     /// Read at most `nbytes` from the current file position. Less bytes may
     /// be read if EOF is reached. This method updates the current file 
position.
     ///
     /// In some cases (e.g. a memory-mapped file), this method may avoid a
     /// memory copy.
     virtual Result<std::shared_ptr<Buffer>> Read(int64_t nbytes) = 0;
   ```
   
   Basically we would just need to change `Less bytes may be read if EOF is 
reached` to `Less bytes may be reads.  If EOF is reached then an empty buffer 
will be returned.`  The C++ equivalent is 
https://en.cppreference.com/w/cpp/io/basic_istream/readsome
   
   Though that would have impacts on anyone using the method (might be better 
to make it a dedicated method like `ReadSome`)


-- 
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