alberttwong opened a new issue, #5037:
URL: https://github.com/apache/arrow-adbc/issues/5037

   ### What feature or improvement would you like to see?
   
   Please add a focused usage example and regression/overhead coverage for 
executing a **single explicitly no-result statement** through the existing 
Python driver-manager DBAPI interfaces. We would prefer reusing and documenting 
the supported path over building a downstream cursor wrapper or requesting a 
redundant new execution API.
   
   Source inspected at `54c26cca8f37562e790b7b0d3ce39b42c6f46c79`:
   
   - 
[Cursor.execute](https://github.com/apache/arrow-adbc/blob/54c26cca8f37562e790b7b0d3ce39b42c6f46c79/python/adbc_driver_manager/adbc_driver_manager/dbapi.py#L913-L947)
 clears the previous result, uses `_prepare_execute` for preparation/binding, 
calls `execute_query`, and constructs a lazy `_RowIterator`.
   - 
[Cursor.executemany](https://github.com/apache/arrow-adbc/blob/54c26cca8f37562e790b7b0d3ce39b42c6f46c79/python/adbc_driver_manager/adbc_driver_manager/dbapi.py#L949-L1020)
 already documents that `seq_of_parameters=None` executes once and calls the 
underlying `execute_update` without creating a result set. Empty parameter 
sequences are intentionally different; see #3319.
   - 
[Cursor.adbc_statement](https://github.com/apache/arrow-adbc/blob/54c26cca8f37562e790b7b0d3ce39b42c6f46c79/python/adbc_driver_manager/adbc_driver_manager/dbapi.py#L1317-L1326)
 publicly exposes the lower-level statement, which also offers `execute_update`.
   
   **The primitive is already implemented.** The requested outcome is a clear 
supported recipe and state/lifetime regression coverage, not automatic SQL 
classification or another default `execute` behavior.
   
   ### Suggested scope
   
   1. Show the canonical unbound single-statement recipe, e.g. 
`cursor.executemany(sql, None)` if maintainers consider that the recommended 
API, plus the equivalent one-set positional/named parameter pattern where 
supported.
   2. Explain the resulting `rowcount`, `description`/fetch behavior, 
cancellation, preparation and prior-result cleanup, and cursor reuse for 
subsequent SELECT/RETURNING.
   3. Clarify the state/lifetime obligations if applications instead use 
`cursor.adbc_statement.execute_update()` directly. Avoid requiring callers to 
manipulate private `_results` or `_last_query` fields.
   4. Add tests for exactly-once execution (`None` versus empty sequences), 
parameter binding, row counts/errors, prior-result cleanup, cancellation and 
reuse. Preserve existing no-parameter and RETURNING behavior; use existing test 
drivers rather than require a downstream Redis service.
   5. Add a small overhead benchmark or call-count test distinguishing the 
no-result path from execute-query plus an unused stream. Any speedup estimate 
should come from complete native operations with equivalent lifetime boundaries 
and independent data validation.
   
   ### Why this helps downstream
   
   Our generated Go ADBC bridge already routes a null output stream to 
ExecuteUpdate. Current [native CRUD 
measurements](https://github.com/redis/redis-adbc-driver/blob/987b5db1debf34c25440124fc51e4a28e5fbbb97/benchmarks/crud-execution/results/2026-11-15/README.md)
 still show substantial driver overhead; [separate cursor 
diagnostics](https://github.com/redis/redis-adbc-driver/blob/987b5db1debf34c25440124fc51e4a28e5fbbb97/benchmarks/crud-execution/results/diagnostics/README.md)
 observe previous-result cleanup as one opportunity. They do **not** establish 
that DBAPI is the main cause, that the no-result API is missing, or a speedup 
from switching paths. Go ExecuteUpdate and ordinary Python execute were 
different workloads in those diagnostics and cannot be directly subtracted.
   
   A documented public route could avoid downstream wrappers/private state 
manipulation and let us evaluate the existing capability correctly: 
https://github.com/redis/redis-adbc-driver/issues/447. The generated FFI GC 
policy remains separately tracked in 
https://github.com/adbc-drivers/driverbase-go/issues/243.
   
   This is distinct from #3584's `Cursor.description` bug for ordinary 
`execute()`. Please preserve standard execute semantics, SELECT and DML 
RETURNING results; do not infer no-result safety from a SQL regex or an empty 
schema, and do not retry SQL/input after failure.
   
   No new benchmark, driver-manager regression or measured performance gain is 
claimed by this request.
   


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