Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Format] Query cancellation and progress #458

Closed
lidavidm opened this issue Feb 15, 2023 · 0 comments · Fixed by #971
Closed

[Format] Query cancellation and progress #458

lidavidm opened this issue Feb 15, 2023 · 0 comments · Fixed by #971

Comments

@lidavidm
Copy link
Member

lidavidm commented Feb 15, 2023

Executing a query requires blocking and waiting for results to be available. This is imperfect:

  • There's no way for a client to cancel query execution.
  • There's no way to get query progress. APIs like JDBC don't support this (nor do databases like PostgreSQL), but vendors like BigQuery and Snowflake do support this. (OLTP use cases often consider long queries a problem, but OLAP queries are expected to take a while.)

Proposal

  • Add AdbcStatementCancelExecution. This is explicitly a thread-safe operation.
  • Clarify that releasing an ArrowArrayStream early should mean cancellation of the underlying query when returned from ExecuteQuery, but not when returned from ReadPartition.
  • Add AdbcStatementGetDouble(struct AdbcStatement*, const char*, double*) and a corresponding string constant to retrieve query progress information. (This is also explicitly thread-safe.)

Open Questions

  • Should we go ahead and add a full complement of Get/SetFoo functions for all objects right now to avoid further ABI changes in the future? We could then also expose things like the proposed result set expiration and the endpoints_ordered flag from Flight SQL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant