-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Spanner: Make rows, consume_all and consume_next private #4492
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
Spanner: Make rows, consume_all and consume_next private #4492
Conversation
|
@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.
spanner/tests/system/test_system.py
Outdated
| 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.
spanner/tests/system/test_system.py
Outdated
| 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.
cfa42c0 to
f1c3cd8
Compare
tseaver
left a comment
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.
Let's just delete the two system tests: they are redundant with those in other testcases.
f1c3cd8 to
b4e4551
Compare
|
|
||
| @property | ||
| def rows(self): | ||
| def _rows(self): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| 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.
spanner/tests/unit/test_snapshot.py
Outdated
| 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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| # 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.
d5d3378 to
2ed147a
Compare
|
I just changed the _rows to list. I will put that in another PR. |
2ed147a to
c34f2c9
Compare
See #4414 and #4204