Skip to content
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

Use yield_rows for rows() and scan() #37

Merged
merged 9 commits into from
Jul 17, 2018

Conversation

vikas-jamdar
Copy link
Contributor

Updated rows() and scan() for yield_rows in happybase table.py. Added yield_rows in _MockLowLevelTable in unit_tests/test_table.py

@sduskis
Copy link

sduskis commented Jun 25, 2018

Please change the title to "Use yield_rows for rows() and scan()"

@vikas-jamdar vikas-jamdar changed the title Vikas yield row Use yield_rows for rows() and scan() Jun 25, 2018
@vikas-jamdar
Copy link
Contributor Author

vikas-jamdar commented Jun 25, 2018

@tseaver

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.

@sduskis
Copy link

sduskis commented Jul 2, 2018

@theacodes, is someone available to review this code?

@sduskis
Copy link

sduskis commented Jul 9, 2018

@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.

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.

This comment was marked as spam.

@vikas-jamdar
Copy link
Contributor Author

@tseaver ,

Please let me know if any improvement needed in this PR

@@ -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.

@vikas-jamdar
Copy link
Contributor Author

@tseaver
consume_all() has been removed from yield_rows and _MockPartialRowsData. Let me know if anymore improvements needed.

@tseaver tseaver merged commit 67a0d1d into googleapis:master Jul 17, 2018
@tseaver
Copy link
Contributor

tseaver commented Jul 17, 2018

@vikas-jamdar Thanks for your effort and persistence!

@vikas-jamdar
Copy link
Contributor Author

@tseaver

You are welcome. If there are any other open issues(any google client library), let me know. I am eager to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants