Fix SEA backend prematurely closing Statement/PreparedStatement after execute()#1373
Open
vikrantpuppala wants to merge 1 commit intomainfrom
Open
Fix SEA backend prematurely closing Statement/PreparedStatement after execute()#1373vikrantpuppala wants to merge 1 commit intomainfrom
vikrantpuppala wants to merge 1 commit intomainfrom
Conversation
The SEA backend was calling markAsClosed() on the JDBC Statement when the server returned StatementState.CLOSED, preventing PreparedStatement reuse and blocking getMetaData() after execution. Per JDBC spec §13.1.1, Statement objects should remain open until explicitly closed by the user. Remove the auto-close logic from DatabricksSdkClient.executeStatement() so that SEA behaves like the Thrift backend. Co-authored-by: Isaac Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DatabricksSdkClient.executeStatement()that calledmarkAsClosed()when the SEA server returnedStatementState.CLOSEDgetMetaData()after execution on the SEA backendTest plan
testExecuteStatementWithClosedStatusDoesNotCloseStatementto verify statement remains open after CLOSED responsetestExecuteStatementWithClosedStatusAndNoParentStatementstill passesDatabricksStatementTestmarkAsClosed tests still pass (method retained for potential future use)NO_CHANGELOG=true
This pull request was AI-assisted by Isaac.