Skip to content

Conversation

@larkee
Copy link
Contributor

@larkee larkee commented Oct 13, 2020

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 google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 13, 2020
@larkee larkee marked this pull request as ready for review October 13, 2020 03:02
@larkee larkee requested a review from a team as a code owner October 13, 2020 03:02
Copy link
Contributor

@thiagotnunes thiagotnunes left a comment

Choose a reason for hiding this comment

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

LGTM

@larkee larkee merged commit d132409 into googleapis:master Oct 13, 2020
gcf-merge-on-green bot pushed a commit that referenced this pull request Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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