-
Notifications
You must be signed in to change notification settings - Fork 29
Use yield_rows for rows() and scan() #37
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
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. |
src/google/cloud/happybase/table.py
Outdated
# 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
@@ -1537,8 +1525,3 @@ def __init__(self, rows=None, iterations=0): | |||
|
|||
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