fix: remove trailing semicolons in DDL#3879
Merged
gcf-merge-on-green[bot] merged 1 commit intomainfrom May 16, 2025
Merged
Conversation
The Connection API should automatically remove any trailing semicolons in DDL statements. Spanner accepts trailing semicolons in queries and DML statements, but not in DDL statements. Previously, the Connection API would remove all comments and trailing semicolons from DDL statements. Comments are now supported in DDL statements, and are therefore no longer removed by the Conneciton API, but that change also unintentionally kept any trailing semicolons in the SQL string that is sent to Spanner. Fixes cloudspannerecosystem/liquibase-spanner#481
sakthivelmanii
approved these changes
May 16, 2025
svc-squareup-copybara
pushed a commit
to cashapp/misk
that referenced
this pull request
May 22, 2025
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-spanner](https://github.com/googleapis/java-spanner) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `6.93.0` -> `6.94.0` | --- ### Release Notes <details> <summary>googleapis/java-spanner (com.google.cloud:google-cloud-spanner)</summary> ### [`v6.94.0`](https://github.com/googleapis/java-spanner/blob/HEAD/CHANGELOG.md#6940-2025-05-21) ##### Features - Add throughput_mode to UpdateDatabaseDdlRequest to be used by Spanner Migration Tool. See https://github.com/GoogleCloudPlatform/spanner-migration-tool ([3070f1d](googleapis/java-spanner@3070f1d)) ##### Bug Fixes - **deps:** Update the Java code generator (gapic-generator-java) to 2.58.0 ([3070f1d](googleapis/java-spanner@3070f1d)) - Remove trailing semicolons in DDL ([#​3879](googleapis/java-spanner#3879)) ([ca3a67d](googleapis/java-spanner@ca3a67d)) ##### Dependencies - Update dependency com.google.cloud:sdk-platform-java-config to v3.48.0 ([#​3869](googleapis/java-spanner#3869)) ([afa17f7](googleapis/java-spanner@afa17f7)) - Update dependency com.google.cloud:sdk-platform-java-config to v3.48.0 ([#​3880](googleapis/java-spanner#3880)) ([f3b00b6](googleapis/java-spanner@f3b00b6)) - Update dependency com.google.cloud.opentelemetry:exporter-metrics to v0.34.0 ([#​3861](googleapis/java-spanner#3861)) ([676b14f](googleapis/java-spanner@676b14f)) - Update dependency commons-io:commons-io to v2.19.0 ([#​3863](googleapis/java-spanner#3863)) ([80a6af8](googleapis/java-spanner@80a6af8)) - Update dependency io.opentelemetry:opentelemetry-bom to v1.50.0 ([#​3865](googleapis/java-spanner#3865)) ([ae63050](googleapis/java-spanner@ae63050)) - Update googleapis/sdk-platform-java action to v2.58.0 ([#​3870](googleapis/java-spanner#3870)) ([d1e45fa](googleapis/java-spanner@d1e45fa)) - Update opentelemetry.version to v1.50.0 ([#​3866](googleapis/java-spanner#3866)) ([f7e09b8](googleapis/java-spanner@f7e09b8)) ##### Documentation - Add samples for unnamed (positional) parameters ([#​3849](googleapis/java-spanner#3849)) ([035cadd](googleapis/java-spanner@035cadd)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: 50f3ed7d0e09e8a8da9c387b66bee50caef7b67e
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.
The Connection API should automatically remove any trailing semicolons in DDL statements. Spanner accepts trailing semicolons in queries and DML statements, but not in DDL statements. Previously, the Connection API would remove all comments and trailing semicolons from DDL statements. Comments are now supported in DDL statements, and are therefore no longer removed by the Conneciton API, but that change also unintentionally kept any trailing semicolons in the SQL string that is sent to Spanner.
Fixes cloudspannerecosystem/liquibase-spanner#481