You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/04 22:14:17 UTC

[GitHub] [arrow] emkornfield commented on a change in pull request #9053: ARROW-11081: [Java] Make IPC option immutable

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



##########
File path: java/flight/flight-core/src/main/java/org/apache/arrow/flight/ArrowMessage.java
##########
@@ -194,10 +194,9 @@ public ArrowMessage(FlightDescriptor descriptor) {
   private ArrowMessage(FlightDescriptor descriptor, MessageMetadataResult message, ArrowBuf appMetadata,
                        ArrowBuf buf) {
     // No need to take IpcOption as this is used for deserialized ArrowMessage coming from the wire.
-    this.writeOption = new IpcOption();
-    if (message != null) {
-      this.writeOption.metadataVersion = MetadataVersion.fromFlatbufID(message.getMessage().version());
-    }
+    this.writeOption = message != null ?
+        new IpcOption(false, MetadataVersion.fromFlatbufID(message.getMessage().version())) :

Review comment:
       please comment the literal.




----------------------------------------------------------------
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:
users@infra.apache.org