xinyiZzz commented on issue #1079:
URL: https://github.com/apache/arrow-adbc/issues/1079#issuecomment-1726038438

   Sorry, the above description is not accurate, correction:
   
   `adbc_driver_manager.AdbcConnection` will trigger authenticate 4 times, two 
of the handshakes will use `BASIC_PREFIX`, Why do we need two handshakes?
   1. 
   methodName: `arrow.flight.protocol.FlightService/Handshake`
   incomingHeaders: `authorization=Basic cm9vdDo`
   2.
   methodName: `arrow.flight.protocol.FlightService/GetFlightInfo`
   incomingHeaders: `authorization=Bearer test_token)`
   3. 
   methodName: `arrow.flight.protocol.FlightService/Handshake`
   incomingHeaders: `authorization=Basic cm9vdDo`
   4.
   methodName: `arrow.flight.protocol.FlightService/DoGet`
   incomingHeaders: `authorization=Bearer test_token)`
   
   `stmt.execute_query()` will trigger the fifth authenticate, correct use of 
bearer tokens:
   5.
   methodName: `arrow.flight.protocol.FlightService/GetFlightInfo`
   incomingHeaders: `authorization=Bearer test_token)`
   ```
   import pyarrow
   
   import adbc_driver_flightsql.dbapi as flight_sql
   import adbc_driver_flightsql
   import adbc_driver_manager
   
   db = adbc_driver_flightsql.connect(uri="grpc://10.16.10.8:10478", db_kwargs={
               adbc_driver_manager.DatabaseOptions.USERNAME.value: "root",
               adbc_driver_manager.DatabaseOptions.PASSWORD.value: "",
           })
   
   conn = adbc_driver_manager.AdbcConnection(db)
   
   stmt = adbc_driver_manager.AdbcStatement(conn)
   
   stmt.set_sql_query("select * from tpch.hdf5 limit 1000000;")
   stream, rows = stmt.execute_query()
   ```
   
   


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