-
Notifications
You must be signed in to change notification settings - Fork 110
Rewrite PartialResultStream #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…as we have a row.
|
@crwilcox I made some changes, but my tests still pass. If this looks okay to you, I'll move onto unit tests. |
Codecov Report
@@ Coverage Diff @@
## master #208 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 12 12
Lines 1402 1385 -17
=====================================
- Hits 1402 1385 -17
Continue to review full report at Codecov.
|
Thanks for stripping out that dead code. I had forgotten about that. I will stress it over lunch here just to make sure but it looks good after 5 loops. Feel free to move forward. |
var field = fields[index]; | ||
return { | ||
name: field.name, | ||
value: codec.decode(value, field), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Status update: I took over the PR and did some refactors. Wrote unit tests, all was well. One quick check that the system tests work, then 💥 -- I don't remember the exact number, but let's say ~20 tests failed. I reverted my refactors to see if it was something I did, but unfortunately, same errors. I realized something we didn't carry over when @crwilcox made his changes was a call to Basically, I'm hoping @crwilcox can dive back in for a second to see if he has any ideas. I'll leave some comments on this PR next to the behavioral changes I've made since you last touched the code. |
@@ -72,7 +71,7 @@ RowBuilder.formatValue = function(field, value) { | |||
} | |||
|
|||
if (field.code !== 'STRUCT') { | |||
return value; | |||
return codec.decode(value, field); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/codec.js
Outdated
@@ -118,7 +118,7 @@ codec.generateToJSONFromRow = generateToJSONFromRow; | |||
* @private | |||
*/ | |||
function decode(value, field) { | |||
function decodeValue_(decoded, type) { | |||
function decodeValue_(decoded, type, options) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -46,7 +45,7 @@ RowBuilder.getValue = function(obj) { | |||
var value = obj; | |||
|
|||
if (obj && obj.kind) { | |||
value = obj[obj.kind]; | |||
value = commonGrpc.Service.decodeValue_(obj); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/row-builder.js
Outdated
|
||
if (!is.empty(this.rows[0]) && this.currentRow.length !== this.fields.length) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@crwilcox I think we're finally good again. Units, systems, and your revision of the "issue-180.js" file I've checked are working. It would be great if you could confirm! |
100% line coverage is what we go for. Can you show more details about the system test errors? |
Sure, but the system tests seem to also be an issue on builds before your commits.
|
@alexander-fenster ran the system tests and had a different failure. I don't believe these are related to our PR here. @callmehiphop can you run these? I suppose we could always do a merge to let Circle have a go at them, then revert it if necessary. |
Reran the tests and they pass on master and on this branch. I think this is safe to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, hope I correctly understood the idea of the changes.
Fixes #180 and #198 by reworking the way we process streamed rows from PartialResultStream on Spanner. The high-level difference is this
To Dos