Skip to content

Comments

spanner: Properly handle multi-row mutations with heterogeneous columns#2417

Closed
jscinoz wants to merge 1 commit intogoogleapis:masterfrom
AvokaTech:feature/fix-2411
Closed

spanner: Properly handle multi-row mutations with heterogeneous columns#2417
jscinoz wants to merge 1 commit intogoogleapis:masterfrom
AvokaTech:feature/fix-2411

Conversation

@jscinoz
Copy link

@jscinoz jscinoz commented Jun 28, 2017

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.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 28, 2017
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.
@jscinoz jscinoz force-pushed the feature/fix-2411 branch from 0b77c86 to a2a8ce5 Compare June 28, 2017 01:20
@coveralls
Copy link

Coverage Status

Coverage increased (+1.0e-05%) to 99.988% when pulling a2a8ce5 on AvokaTech:feature/fix-2411 into ca0d96c on GoogleCloudPlatform:master.

@stephenplusplus
Copy link
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. 👍

@stephenplusplus stephenplusplus added the api: spanner Issues related to the Spanner API. label Jun 28, 2017
@vkedia
Copy link
Contributor

vkedia commented Jun 28, 2017

@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.

@stephenplusplus
Copy link
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
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](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) | [![age](https://developer.mend.io/api/mc/badges/age/npm/gapic-tools/0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/gapic-tools/0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/gapic-tools/0.3.0/0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/gapic-tools/0.3.0/0.4.0?slim=true)](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 ([#&#8203;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-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the Spanner API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spanner: Unable to insert multiple rows in a single table.insert/transaction.insert call when some rows lack a value for nullable columns

5 participants