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



##########
File path: 
java/flight/flight-core/src/main/java/org/apache/arrow/flight/ArrowMessage.java
##########
@@ -67,7 +67,25 @@
  */
 class ArrowMessage implements AutoCloseable {
 
-  public static final boolean FAST_PATH = true;
+  // If true, serialize Arrow data by giving gRPC a reference to the 
underlying Arrow buffer
+  // instead of copying the data. Defaults to true.
+  public static final boolean ENABLE_ZERO_COPY_READ;
+  // If true, serialize Arrow data by giving gRPC a reference to the 
underlying Arrow buffer
+  // instead of copying the data. Defaults to false.
+  public static final boolean ENABLE_ZERO_COPY_WRITE;
+
+  static {
+    String zeroCopyReadFlag = 
System.getProperty("arrow.flight.enable_zero_copy_read");
+    if (zeroCopyReadFlag == null) {
+      zeroCopyReadFlag = System.getenv("ARROW_FLIGHT_ENABLE_ZERO_COPY_READ");
+    }
+    String zeroCopyWriteFlag = 
System.getProperty("arrow.flight.enable_zero_copy_write");
+    if (zeroCopyWriteFlag == null) {
+      zeroCopyWriteFlag = System.getenv("ARROW_FLIGHT_ENABLE_ZERO_COPY_WRITE");
+    }
+    ENABLE_ZERO_COPY_READ = !"false".equals(zeroCopyReadFlag);

Review comment:
       not sure if this is for consistency with other flags, but 
equalsIgnoreCase would be slightly more robust.  having a static helper method 
here to consolidate might be useful.




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