odbc-api
odbc-api copied to clipboard
more complete async support and async bug
So I got arrow-odbc (almost) working with async-polling with these two PRs: https://github.com/pacman82/arrow-odbc/pull/102 and https://github.com/pacman82/odbc-api/pull/577
But I'm running into an issue with the snowflake ODBC driver. We're using the snowflake driver, which complains that we free the statement before we've completed executing (I've concluded that based on the error message and the MS docs here (https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlfreestmt-function?view=sql-server-ver16#diagnostics).
The query seems to stream fine, but the driver fails when the inner BlockCursorPolling
is dropped in the AsyncBatchedOdbcReader
struct, panicking in the drop impl for BlockCursorPolling with the following error:
Unexpected error unbinding columns: Diagnostics { record: State: HY010, Native error: 0, Message: [unixODBC][Driver Manager]Function sequence error, function: "SQLFreeStmt" }
I'm unsure how this is possible since all methods that use wait_for() do not return until StillExecuting
is not returned. And if a method didn't handle StillExecuting,
then it would panic here https://github.com/nobie-org/odbc-api/blob/a20309759e83ebdfbeac5c115b24b97917d6b5fd/odbc-api/src/error.rs#L244