FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: handle Unmergable errors when merging struct responses by larkee · Pull Request #152 · googleapis/python-spanner · GitHub

This repository was archived by the owner on Jun 8, 2026. It is now read-only.
/ python-spanner Public archive

fix: handle Unmergable errors when merging struct responses - #152

Merged
larkee merged 1 commit into
googleapis:masterfrom
larkee:fix-merge-bug
Oct 13, 2020
Merged

larkee merged 1 commit into
googleapis:masterfrom
larkee:fix-merge-bug

Conversation

larkee commented Oct 13, 2020

Copy link
Copy Markdown
Contributor

This PR fixes a bug in the StreamedResultSet logic for merging chunked values where the chunked value is an array of structs and the chunk boundary splits a struct element in two and the halves aren't correctly merged.

This bug results in the struct element incorrectly being split into two partial struct elements.

Expected:

('foo', 0.5, DatetimeWithNanoseconds(2020, 1, 1, 0, 0, tzinfo=<UTC>))

Actual:

('foo', 0.5)
('2020-01-01T00:00:00Z',)

This bug is caused by an unhandled Unmergable error in _merge_struct. This PR adds the same handling used for _merge_array and a unit test to prove the fix works.

google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 13, 2020
larkee marked this pull request as ready for review October 13, 2020 03:02
larkee requested a review from a team October 13, 2020 03:02

thiagotnunes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

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.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL