Uh oh!
There was an error while loading. Please reload this page.
Spanner: Make rows, consume_all and consume_next private - #4492
Conversation
chemelnucfin
commented
Dec 6, 2017
@tseaver PTAL, thanks. |
| def __init__(self, response_iterator, source=None): | ||
| self._response_iterator = response_iterator | ||
| self._rows = [] # Fully-processed rows | ||
| self._processed_rows = [] # Fully-processed rows |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| while True: | ||
| try: | ||
| streamed.consume_next() | ||
| streamed._consume_next() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| retrieved += len(streamed.rows) | ||
| streamed.rows[:] = () | ||
| retrieved += len(streamed._rows) | ||
| streamed._rows[:] = () |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
cfa42c0 to
f1c3cd8Compare
tseaver
left a comment
There was a problem hiding this comment.
Let's just delete the two system tests: they are redundant with those in other testcases.
f1c3cd8 to
b4e4551Compare| @property | ||
| def rows(self): | ||
| def _rows(self): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| self._merge_values(values) | ||
| def consume_all(self): | ||
| def _consume_all(self): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chemelnucfin
commented
Dec 7, 2017
| self.assertIsNone(result_set._source) | ||
| result_set._consume_all() | ||
| # result_set._consume_all() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| # result_set._consume_all() | ||
| self.assertEqual(list(result_set._rows), VALUES) | ||
| self.assertEqual(list(result_set), VALUES) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
d5d3378 to
2ed147aComparechemelnucfin
commented
Dec 13, 2017
I just changed the _rows to list. I will put that in another PR. |
2ed147a to
c34f2c9Compare* Spanner: Make rows, consume_all and consume_next private * review changes * Spanner: remove _consume_all and _rows methods * Spanner: delete unnecessary tests
See #4414 and #4204