liukun4515 commented on issue #2445:
URL: https://github.com/apache/arrow-rs/issues/2445#issuecomment-1225095059
@skejserjensen , you can implement `GetSchema` by wrapping the schema to the
ipc message format in the server side.
You can follow bellow code which is in the arrow-rs.
```
impl TryFrom<SchemaAsIpc<'_>> for IpcMessage {
type Error = ArrowError;
fn try_from(schema_ipc: SchemaAsIpc) -> ArrowResult<Self> {
let pair = *schema_ipc;
let encoded_data = flight_schema_as_encoded_data(pair.0, pair.1);
let mut schema = vec![];
arrow::ipc::writer::write_message(&mut schema, encoded_data,
pair.1)?;
Ok(IpcMessage(schema))
}
}
```
--
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]