monkwire commented on code in PR #5448:
URL: https://github.com/apache/arrow-rs/pull/5448#discussion_r1510143044


##########
arrow-flight/tests/flight_sql_client_cli.rs:
##########
@@ -245,7 +245,7 @@ impl FlightSqlService for FlightSqlServiceImpl {
             "part_2" => batch.slice(2, 1),
             ticket => panic!("Invalid ticket: {ticket:?}"),
         };
-        let schema = batch.schema();
+        let schema = batch.schema().clone();
         let batches = vec![batch];
         let flight_data = batches_to_flight_data(schema.as_ref(), batches)

Review Comment:
   I tried this change on my machine, but I got a borrow checker error. How 
does this look instead?
   ```suggestion
           let schema = batch.schema();
           let batches = vec![batch.clone()];
           let flight_data = batches_to_flight_data(schema, batches)
   ```



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