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



##########
File path: 
java/vector/src/main/java/org/apache/arrow/vector/ipc/message/ArrowRecordBatch.java
##########
@@ -194,12 +190,17 @@ public int writeTo(FlatBufferBuilder builder) {
     int nodesOffset = FBSerializables.writeAllStructsToVector(builder, nodes);
     RecordBatch.startBuffersVector(builder, buffers.size());
     int buffersOffset = FBSerializables.writeAllStructsToVector(builder, 
buffersLayout);
-    int compressOffset = bodyCompression.writeTo(builder);
+    int compressOffset = 0;
+    if (bodyCompression != null) {

Review comment:
       I would think the only change really necessary here would have been to 
compare bodyCompression == NO_COMPRESSION_CODEC that way you can keep things 
non-null everyplace else within the 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:
us...@infra.apache.org


Reply via email to