amunra opened a new issue, #4656:
URL: https://github.com/apache/arrow-rs/issues/4656
The API is pretty inconsistent, sometimes requiring a `Schema` and sometimes
a `SchemaRef`.
For example I hold a `SchemaRef`, but `batches_to_flight_data` requires a
`Schema`, forcing me to create a clone of the ref counted object.
Instead, the function should just take a `&Schema`.
```rust
pub fn batches_to_flight_data(
schema: Schema,
batches: Vec<RecordBatch>,
) -> Result<Vec<FlightData>, ArrowError> {
let options = IpcWriteOptions::default();
let schema_flight_data: FlightData = SchemaAsIpc::new(&schema,
&options).into();
^___ it's borrowed
later anyways!
```
--
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]