kou commented on issue #36348:
URL: https://github.com/apache/arrow/issues/36348#issuecomment-1612290815

   The following code should work but there is a problem (#36369) for now:
   
   ```ruby
   require "arrow-flight-sql"
   
   call_options = ArrowFlight::CallOptions.new
   client = ArrowFlight::Client.new("grpc://127.0.0.1:50050")
   client.authenticate_basic("admin", "password", call_options)
   sql_client = ArrowFlightSQL::Client.new(client)
   
   info = sql_client.execute("SELECT 'hello'", call_options)
   endpoint = info.endpoints.first
   reader = sql_client.do_get(endpoint.ticket, call_options)
   table = reader.read_all
   p table
   ```
   
   We should be able to use ADBC too:
   
   ```ruby
   require "adbc"
   
   options = {
     "driver" => "adbc_driver_flightsql",
     "uri" => "grpc://127.0.0.1:50050",
     "username" => "admin",
     "password" => "password",
   }
   ADBC::Database.open(**options) do |database|
     database.connect do |connection|
       connection.open_statement do |statement|
         table, _n_rows_affected = statement.query("SELECT 'hello'")
         p table
       end
     end
   end
   ```
   
   But it also doesn't work for now...


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