tustvold commented on code in PR #5448:
URL: https://github.com/apache/arrow-rs/pull/5448#discussion_r1510080526
##########
arrow-flight/examples/flight_sql_server.rs:
##########
@@ -643,7 +643,8 @@ impl FlightSqlService for FlightSqlServiceImpl {
self.check_token(&request)?;
let schema = Self::fake_result()
.map_err(|e| status!("Error getting result schema", e))?
- .schema();
+ .schema()
+ .clone();
let message = SchemaAsIpc::new(&schema, &IpcWriteOptions::default())
Review Comment:
I think we could avoid this clone
##########
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:
```suggestion
let schema = batch.schema();
let batches = vec![batch];
let flight_data = batches_to_flight_data(schema.as_ref(), 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]