agneborn98 commented on issue #13853:
URL: https://github.com/apache/arrow/issues/13853#issuecomment-1212144242

   This is the Rust code if anyone experienced with that decides to pitch in:
   
   ```
   /// Provide the schema of a table in the catalog. The name of the table must
   /// be provided as the first element in `FlightDescriptor.path`.
   async fn get_schema(
       &self,
       request: Request<FlightDescriptor>,
   ) -> Result<Response<SchemaResult>, Status> {
       let flight_descriptor = request.into_inner();
       let table_name = 
self.get_table_name_from_flight_descriptor(&flight_descriptor)?;
       let schema = self.get_table_schema_from_default_catalog(table_name)?;
   
       let options = IpcWriteOptions::default();
       let schema_as_ipc = SchemaAsIpc::new(&*schema, &options);
       let serialized_schema = schema_as_ipc
           .try_into()
           .map_err(|error: Infallible| Status::internal(error.to_string()))?;
       Ok(Response::new(serialized_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]

Reply via email to