Skip to content

more complete async support and async bug #578

Description

@matthewgapp

So I got arrow-odbc (almost) working with async-polling with these two PRs: pacman82/arrow-odbc#102 and #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions