You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ParthChonkar (via GitHub)" <gi...@apache.org> on 2023/06/18 01:44:09 UTC

[GitHub] [arrow] ParthChonkar opened a new issue, #36153: [Java] ArrowRecordBatch Body Length Computation Only Accounts for Last Buffer

ParthChonkar opened a new issue, #36153:
URL: https://github.com/apache/arrow/issues/36153

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   Hi Arrow Community,
   
   I believe `ArrowRecordBatch::computeBodyLength` has an implementation bug. It does the following 
   
   ```
       for (int i = 0; i < buffers.size(); i++) {
         ArrowBuf buffer = buffers.get(i);
         ArrowBuffer layout = buffersLayout.get(i);
         size = layout.getOffset() + buffer.readableBytes();
   
         // round up size to the next multiple of 8
         size = DataSizeRoundingUtil.roundUpTo8Multiple(size);
       }
       return size;
   ```
   
   Since `size` is being assigned and not incremented at first - computeBodyLength is only accounts for the last buffer 
   
   ### Component(s)
   
   Java


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org