emkornfield commented on a change in pull request #7326:
URL: https://github.com/apache/arrow/pull/7326#discussion_r464024951



##########
File path: 
java/vector/src/main/java/org/apache/arrow/vector/ipc/message/ArrowRecordBatch.java
##########
@@ -232,6 +252,12 @@ public long computeBodyLength() {
       // round up size to the next multiple of 8
       size = DataSizeRoundingUtil.roundUpTo8Multiple(size);
     }
+
+    if (bodyCompression != null) {

Review comment:
       Did you consider making bodyCompression never null (have a static 
instance that represents zero compression) and making a instance method on it 
like 'updateMetadataSize(long size)` instead of putting this check here?  Also 
I'm not familiar with this code but its strange to have to perform this 
calculation outside of serializing flatbuffers?  Is there something analogous 
in the C++ code?




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

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


Reply via email to