spanner: Properly handle multi-row mutations with heterogeneous columns#2417
Closed
jscinoz wants to merge 1 commit intogoogleapis:masterfrom
Closed
spanner: Properly handle multi-row mutations with heterogeneous columns#2417jscinoz wants to merge 1 commit intogoogleapis:masterfrom
jscinoz wants to merge 1 commit intogoogleapis:masterfrom
Conversation
Prior to this change, attempting to insert multiple rows at once with Table#insert or Transaction#insert where some rows lack a value for nullable columns would result in data attempting to be inserted into the incorrect column, due to a flawed assumption in transaction-request.js that every single row contains exact same set of columns, and that the order of keys returned by Object.keys would be identical for each and every row. This fixes googleapis#2411.
0b77c86 to
a2a8ce5
Compare
Contributor
|
Thank you very much! @callmehiphop and I are in the middle of a few other tasks for the week, but we will check this out as soon as possible. 👍 |
Contributor
|
@jscinoz Thanks for sending this. @stephenplusplus @lukesneeringer Can we please prioritise this. Anything that can cause incorrect data to be stored in Spanner makes me really nervous. |
Contributor
|
I made a few changes, but didn't have permission to push to the PR branch. I've continued this PR in #2426. |
sofisl
pushed a commit
that referenced
this pull request
Feb 24, 2026
sofisl
pushed a commit
that referenced
this pull request
Feb 25, 2026
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [gapic-tools](https://togithub.com/googleapis/gax-nodejs) ([source](https://togithub.com/googleapis/gax-nodejs/tree/HEAD/gapic-tools)) | [`^0.3.0` -> `^0.4.0`](https://renovatebot.com/diffs/npm/gapic-tools/0.3.0/0.4.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/gax-nodejs (gapic-tools)</summary> ### [`v0.4.0`](https://togithub.com/googleapis/gax-nodejs/releases/tag/gapic-tools-v0.4.0): gapic-tools: v0.4.0 [Compare Source](https://togithub.com/googleapis/gax-nodejs/compare/gapic-tools-v0.3.0...gapic-tools-v0.4.0) ##### Features - allow passing --keep-case and --force-number to compileProtos ([#​1561](https://togithub.com/googleapis/gax-nodejs/issues/1561)) ([004d112](https://togithub.com/googleapis/gax-nodejs/commit/004d112445f528a6cb143676e8b397b37137adf3)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, 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 [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/nodejs-storage). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjAuMiIsInVwZGF0ZWRJblZlciI6IjM3LjIyMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
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.
Prior to this change, attempting to insert multiple rows at once with Table#insert or
Transaction#insert where some rows lack a value for nullable columns would result in data attempting
to be inserted into the incorrect column, due to a flawed assumption in transaction-request.js that
every single row contains exact same set of columns, and that the order of keys returned by
Object.keys would be identical for each and every row.
This fixes #2411.