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): Ensure consistent read_database behaviour with empty ODBC "iter_batches" #14918

Merged
merged 2 commits into from
Mar 8, 2024

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Mar 8, 2024

Minor follow-up to #14916.

  • Additionally makes the behaviour consistent between ODBC queries and all other connection types when setting iter_batches=True and we have an empty result set (the batch iterator should be empty, vs a single RecordBatch with no rows).
  • Adds "empty dataset" test coverage for KùzuDB.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Mar 8, 2024
@alexander-beedie alexander-beedie changed the title fix(python): ensure consistent read_database behaviour with empty ODBC "iter_batches" fix(python): Ensure consistent read_database behaviour with empty ODBC "iter_batches" Mar 8, 2024
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 81.01%. Comparing base (e1a4179) to head (58ae892).
Report is 8 commits behind head on main.

Files Patch % Lines
py-polars/polars/io/database.py 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14918      +/-   ##
==========================================
- Coverage   81.01%   81.01%   -0.01%     
==========================================
  Files        1331     1332       +1     
  Lines      172786   172885      +99     
  Branches     2456     2458       +2     
==========================================
+ Hits       139975   140055      +80     
- Misses      32343    32363      +20     
+ Partials      468      467       -1     

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

@ritchie46 ritchie46 merged commit 0a56aa4 into pola-rs:main Mar 8, 2024
14 checks passed
@alexander-beedie alexander-beedie deleted the empty-odbc-iterbatches branch March 8, 2024 20:50
@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
Development

Successfully merging this pull request may close these issues.

2 participants