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


##########
arrow-flight/src/utils.rs:
##########
@@ -81,9 +81,9 @@ pub fn flight_data_to_arrow_batch(
 }
 
 /// Convert `RecordBatch`es to wire protocol `FlightData`s
-pub fn batches_to_flight_data(
+pub fn batches_to_flight_data<'a>(
     schema: &Schema,
-    batches: Vec<RecordBatch>,
+    batches: impl IntoIterator<Item = &'a RecordBatch>,

Review Comment:
   To anyone else reading this --  the underlying buffers can be reused in the 
FlightData even if the RecordBatch itself is not. Thus this seems like a good 
change to me
   
   



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