This repository was archived by the owner on Apr 7, 2026. It is now read-only.
fix: support DDL/ClientSideStatement through Connection#executeUpdate API#2324
Closed
rajatbhatta wants to merge 6 commits into
Closed
fix: support DDL/ClientSideStatement through Connection#executeUpdate API#2324rajatbhatta wants to merge 6 commits into
rajatbhatta wants to merge 6 commits into
Conversation
DDL statements are now supported through executeUpdate API in ConnectionImpl and should return 0L in that case. This change will be propagated to executeUpdate APIs through Statement and PreparedStatement in JDBC.
…date API DDL statements and ClientSideStatements which return no result are now supported through executeUpdate API in ConnectionImpl and should return 0L in that case. We add this change to the corresponding async API (executeUpdateAsync) too. This change will be propagated to executeUpdate APIs through Statement and PreparedStatement in JDBC.
olavloite
reviewed
Mar 9, 2023
| long updateCount = updateCountFuture.get(); | ||
| assertEquals(updateCount, 0L); | ||
| } catch (ExecutionException | InterruptedException e) { | ||
| // pass |
Collaborator
There was a problem hiding this comment.
I think that this should cause a test failure. We don't expect this call to fail.
| } | ||
| } | ||
| } catch (ExecutionException | InterruptedException e) { | ||
| // pass |
Collaborator
There was a problem hiding this comment.
This should cause a test failure and not be silently ignored.
| }, | ||
| connection, | ||
| ErrorCode.FAILED_PRECONDITION); | ||
| } else if (type == StatementType.DDL) { |
Collaborator
There was a problem hiding this comment.
This change also requires that we re-generate the generated tests. You can do that with the following Maven command:
mvn -Ddo_log_statements=true exec:java -Dexec.mainClass=com.google.cloud.spanner.connection.SqlTestScriptsGenerator -Dexec.classpathScope="test"
See
Contributor
Author
There was a problem hiding this comment.
This is done. Thanks for pointing it out.
Contributor
|
Closing due to inactivity. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
DDL statements and ClientSideStatements which return no result are now supported through executeUpdate API in ConnectionImpl and should return 0L in that case.
We add this change to the corresponding async API (executeUpdateAsync) too.
This change will be propagated to executeUpdate APIs through Statement and PreparedStatement in JDBC.