alamb commented on code in PR #10206:
URL: https://github.com/apache/arrow-rs/pull/10206#discussion_r3501871733


##########
arrow-flight/src/decode.rs:
##########
@@ -319,11 +331,25 @@ impl FlightDataDecoder {
                     ));
                 };
 
-                let batch = flight_data_to_arrow_batch(
-                    &data,
+                let record_batch = 
message.header_as_record_batch().ok_or_else(|| {
+                    FlightError::DecodeError(
+                        "Unable to convert flight data header to a record 
batch".to_string(),
+                    )
+                })?;
+                let buf = if data.data_body.as_ptr() as usize % 64 == 0 {
+                    Buffer::from(data.data_body.clone())
+                } else {
+                    Buffer::from(data.data_body.as_ref())
+                };

Review Comment:
   This is great advice @gabotechs  -- and thank you @Rich-T-kid for bearing 
with us



-- 
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: [email protected]

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

Reply via email to