xinyiZzz opened a new issue, #38786:
URL: https://github.com/apache/arrow/issues/38786

   ### Describe the usage question you have. Please include as many useful 
details as  possible.
   
   
   I use the following code to connect to flight sql server to execute query, 
two unexpected behaviors occur:
   
   1. First call `createPreparedStatement` of flight server,
   - If throw CallStatus.UNIMPLEMENTED, then `getFlightInfoStatement` will be 
called to using the direct-execution RPC.
   - Otherwise, if `createPreparedStatement` is implemented and returns 
`ActionCreatePreparedStatementResult`, then `getFlightInfoPreparedStatement` 
will be called to prepare and execute query.
   - Is this behavior expected? If so, why is it designed like this? Using the 
Low-level api to execute_query will directly call `getFlightInfoStatement` to 
using the direct-execution RPC.
   
   2. If `createPreparedStatement` is implemented, `cursor.execute` executes 
multiple queries, similar to the following code. `closePreparedStatement` will 
be called once after each `cursor.execute`. Is this as expected?
   
   ```
     conn = flight_sql.connect(uri=my_uri, db_kwargs={
                 adbc_driver_manager.DatabaseOptions.USERNAME.value: "root",
                 adbc_driver_manager.DatabaseOptions.PASSWORD.value: "",
             })
     cursor = conn.cursor()
     cursor.execute("use clickbench;")
     cursor.execute("SELECT SearchPhrase, COUNT(*) as c FROM hits WHERE URL 
LIKE '%google%' AND SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC 
LIMIT 10;")
   ```
   
   ### Component(s)
   
   FlightRPC


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