While working on ADBC/Flight SQL integration, I noticed the example Flight SQL 
server implementations don't fully handle CommandPreparedStatementQuery [1]. 
This message is used to execute a result set-returning prepared statement, and 
is also used to bind parameters before execution.

Right now, the example servers ignore all but the last row of parameters given; 
so while you can provide multiple parameter sets to be executed at once, it's 
not implemented. Based on discussion in [2] the problem is whether we want to 
model multiple result sets, or just assume all the result sets can be 
concatenated into one. (Or, we could explicitly require only a single row of 
parameters.)

Which would be the expected/most desirable behavior? 

Note ADBC faces a similar problem; so far the API assumes all result sets can 
be concatenated into one in this case [3] (this mimics behavior in R's DBI [4]).

[1]: 
https://github.com/apache/arrow/blob/apache-arrow-8.0.0/format/FlightSql.proto#L1488-L1511
[2]: https://issues.apache.org/jira/browse/ARROW-17199
[3]: 
https://github.com/apache/arrow-adbc/blob/41daacca08db041b52b458503e713a80528ba65a/adbc.h#L667-L679
[4]: https://dbi.r-dbi.org/reference/dbbind#specification-1

-David

Reply via email to