You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/09 21:17:07 UTC

[GitHub] [arrow-rs] alamb opened a new issue #1413: Implement Basic FlightSQL Client

alamb opened a new issue #1413:
URL: https://github.com/apache/arrow-rs/issues/1413


   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   The Arrow Flight SQL protocol (TODO link) makes use of `protobuf.Any` which is somewhat messy to use in Rust, meaning implementing FlightSQL clients in Rust is somewhat messy
   
   @wangfenjin  implemented a `FlightSqlServer` trait to assist with the server side of this in  https://github.com/apache/arrow-rs/pull/1386. It would be nice to implement the equivalent on the client side. 
   
   **Describe the solution you'd like**
   To make it easier for people to write flight SQL clients and servers, it would be nice if the arrow-rs crate provided a trait that handled the Any conversion.
   
   Perhaps we can als include an `flight_sql_client.cpp`  inspiration from @lidavidm 's  https://github.com/apache/arrow/blob/master/cpp/examples/arrow/flight_sql_example.cc  in the cpp implementation, as shown in https://github.com/wangfenjin/arrow-datafusion/pull/1
   
   Something like
   
   ```rust
   pub struct FlightSqlClient { .. }
   
   impl FlightSqlClient {
       /// Creates a new client with the provided connection
       pub fn new(channel: Connection) -> Self {
         .. 
       }
   
       /// Do the appropriate requests of
       /// `DoPut` to send `CommandStatementQuery` and then call `GetFlightInfo` to get back the stream of results
       async fn query(
           &mut self,
           query: CommandStatementQuery,
           request: FlightDescriptor,
       ) -> Result<SendableRecordBatchStream, Status>;
   
    ... probably other things
   }
   ```
   
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features you've considered.
   
   **Additional context**
   See server implementation here https://github.com/apache/arrow-rs/pull/1386
   
   
   
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org