carols10cents commented on a change in pull request #8826:
URL: https://github.com/apache/arrow/pull/8826#discussion_r537577588



##########
File path: rust/arrow-flight/src/utils.rs
##########
@@ -26,30 +26,40 @@ use arrow::error::{ArrowError, Result};
 use arrow::ipc::{convert, reader, writer, writer::IpcWriteOptions};
 use arrow::record_batch::RecordBatch;
 
-/// Convert a `RecordBatch` to `FlightData` by converting the header and body 
to bytes
+/// Convert a `RecordBatch` to a vector of `FlightData` representing the bytes 
of the dictionaries
+/// and values. This can't be a `From` implementation because neither 
`RecordBatch` nor `Vec` are
+/// implemented in this crate.
 ///
 /// Note: This implicitly uses the default `IpcWriteOptions`. To configure 
options,
 /// use `flight_data_from_arrow_batch()`
-impl From<&RecordBatch> for FlightData {
-    fn from(batch: &RecordBatch) -> Self {
-        let options = IpcWriteOptions::default();
-        flight_data_from_arrow_batch(batch, &options)
-    }
+pub fn convert_to_flight_data(batch: &RecordBatch) -> Vec<FlightData> {
+    let options = IpcWriteOptions::default();

Review comment:
       Done! I think this is ready for rereview :)




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


Reply via email to