-
Notifications
You must be signed in to change notification settings - Fork 23
Use yield_rows for rows() and scan() #37
Conversation
|
Please change the title to "Use yield_rows for rows() and scan()" |
|
I have done with my changes for use of yield_rows in rows() and scan(). Please review my changes for merge. Is there anything pending pending for this pull request. Let me know if any changes are required. |
|
@theacodes, is someone available to review this code? |
|
@tseaver, this is ready for review. |
| # NOTE: We expect len(rows_dict) == 0, but don't check it. | ||
| curr_row_dict = _partial_row_to_dict( | ||
| curr_row_data, include_timestamp=include_timestamp) | ||
| yield (curr_row_data.row_key, curr_row_dict) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
unit_tests/test_table.py
Outdated
| for row_key in sorted(rows_dict): | ||
| curr_row_data = rows_dict.pop(row_key) | ||
| yield curr_row_data | ||
| self.read_rows_result.consume_next() |
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.
|
@tseaver , Please let me know if any improvement needed in this PR |
unit_tests/test_table.py
Outdated
| self.iterations = iterations | ||
|
|
||
| def consume_all(self): | ||
| self.consume_all_calls += 1 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@tseaver |
|
@vikas-jamdar Thanks for your effort and persistence! |
|
You are welcome. If there are any other open issues(any google client library), let me know. I am eager to contribute. |
Updated rows() and scan() for yield_rows in happybase table.py. Added yield_rows in _MockLowLevelTable in unit_tests/test_table.py