You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ennuite (via GitHub)" <gi...@apache.org> on 2026/09/01 00:34:09 UTC
[I] [FlightRPC][C++] Use is_update in ODBC driver to select correct prepared statement execution flow [arrow]
ennuite opened a new issue, #51115:
URL: https://github.com/apache/arrow/issues/51115
### Describe the enhancement requested
Currently, `FlightSqlStatement::ExecutePrepared()` in the Flight SQL ODBC driver always routes prepared statement execution through `CommandPreparedStatementQuery` (the query/result-set flow), even for `UPDATE`/`INSERT`/`DELETE` statements:
```cpp
// flight_sql_statement.cc
bool FlightSqlStatement::ExecutePrepared() {
Result<std::shared_ptr<FlightInfo>> result =
prepared_statement_->Execute(call_options_); // always query flow
...
}
```
After #49498 added `is_update` to `ActionCreatePreparedStatementResult` in the protocol, and once the C++ core API exposes it (#51114), the ODBC driver should use this field to choose the correct execution path.
The following changes are needed:
1. Update `FlightSqlStatement::ExecutePrepared()` in `odbc_impl/flight_sql_statement.cc` to call `prepared_statement_->ExecuteUpdate()` when `is_update == true`, and `Execute()` otherwise
2. Update the SQLite example server's `CreatePreparedStatement()` (`example/sqlite_server.cc`) to detect whether the query is an update statement and set `is_update` accordingly, so the mock server used in integration tests exercises the new path
3. Add integration tests for prepared statement update queries (`INSERT`/`UPDATE`/`DELETE`) in `tests/statement_test.cc`
Depends on #51114.
### Component(s)
FlightRPC
Related
- #49497
- #49498
- #51114
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org