liukun4515 commented on issue #2445:
URL: https://github.com/apache/arrow-rs/issues/2445#issuecomment-1223564637

   From the
   
   ```
   impl TryFrom<SchemaAsIpc<'_>> for IpcMessage {
       type Error = ArrowError;
   
       fn try_from(schema_ipc: SchemaAsIpc) -> ArrowResult<Self> {
           let pair = *schema_ipc;
           // schema as data
           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))
       }
   }
   ```
   
   ```
   impl From<SchemaAsIpc<'_>> for SchemaResult {
       fn from(schema_ipc: SchemaAsIpc) -> Self {
           let IpcMessage(vals) = flight_schema_as_flatbuffer(schema_ipc.0, 
schema_ipc.1);
           SchemaResult { schema: vals }
       }
   }
   ```
   converting the schema to other type  has the different implementation.


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