Skip to content

Close operation after executing statement #65

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

Merged
merged 2 commits into from
Dec 2, 2022

Conversation

rcypher-databricks
Copy link
Contributor

When executing a query there is a rows object returned to the client and the client is then responsible for closing the row set when finished with it.
Closing the rows causes the driver to close the operation on the server.

When executing a statement (ex. DROP TABLE ...) the client doesn't receive anything by which they can close the operation. This results in an operation that is completed but not closed. Eventually the open operation is closed due to inactivity but the driver should be closing the operation.

  • updated connection.ExecContext to close the operation if 1) we receive an operation handle back from the server and 2) the operations status is not already closed.
  • added unit test to check that we do/don't close the operation depending on the returned operation status.

Signed-off-by: Raymond Cypher [email protected]

Signed-off-by: Raymond Cypher <[email protected]>
Copy link
Contributor

@andrefurlan-db andrefurlan-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rcypher-databricks rcypher-databricks merged commit 4da02dc into databricks:main Dec 2, 2022
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 this pull request may close these issues.

2 participants