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

fix(python): Address issue with read_database draining iter_batches early #15504

Merged

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Apr 6, 2024

Closes #15470 and closes #15469.

The generator was inadvertently being drained on the first call by a rogue "list" invocation - while it was correctly using fetchmany internally, it should only have been retrieving one batch per iteration, not retrieving all batches and then iterating (possibly something I was doing while debugging or refactoring that accidentally made it into a release 🤦).

@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Apr 6, 2024
Copy link

codecov bot commented Apr 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.15%. Comparing base (31df06d) to head (f26c340).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15504      +/-   ##
==========================================
+ Coverage   81.14%   81.15%   +0.01%     
==========================================
  Files        1362     1362              
  Lines      174951   174951              
  Branches     2533     2533              
==========================================
+ Hits       141960   141987      +27     
+ Misses      32508    32482      -26     
+ Partials      483      482       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@stinodego stinodego merged commit c7910b2 into pola-rs:main Apr 6, 2024
17 checks passed
@alexander-beedie alexander-beedie deleted the fix-read-database-iter-batches branch April 6, 2024 11:10
@alexander-beedie alexander-beedie added the A-io-database Area: reading/writing to databases label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io-database Area: reading/writing to databases fix Bug fix python Related to Python Polars
Projects
None yet
2 participants