Skip to content

Conversation

@madhav-db
Copy link
Collaborator

@madhav-db madhav-db commented Nov 26, 2025

Description

Close statements based on Execute Statement Response SEA

Flow:

  1. User calls executeQuery
  2. executeInternal in DatabricksStatement is called, and creates direct same thread executor
  3. Runs on same thread, calls getResultFromClient
  4. After execution, server responds with status: CLOSED, we detect the state and call markAsClosed which soft closes the statement (does not shut down the executor)
  5. We return result set to user
  6. User calls statement.close()
  7. DatabricksStatement sees isClosed=true, skips the server close (since it's already closed), closes result set and shuts down the executor.

Testing

Additional Notes to the Reviewer

@madhav-db madhav-db requested a review from gopalldb November 26, 2025 05:07
@gopalldb
Copy link
Collaborator

Description

Close statements based on Execute Statement Response SEA

Testing

Additional Notes to the Reviewer

Add testing section

@madhav-db madhav-db requested a review from gopalldb November 27, 2025 06:38
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