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

feat(python): Support the most recent version of "duckdb_engine" connections via read_database #18277

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Aug 20, 2024

Closes #18263.

One of those rare two-character fixes... ;)

Following the "duckdb_engine" code a little more closely showed that we didn't need to expose the inner/private connection object to take advantage of the fetch_arrow_table fast path; the driver connection's __getattr__ accesses it implicitly for us. (Explicit access via .c was deprecated and removed recently, hence the reported error).

Confirmed the fix works and still takes the Arrow-aware fast path with old/new versions of the "duckdb_engine" alchemy driver.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Aug 20, 2024
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.21%. Comparing base (c88da1f) to head (9b5e45a).
Report is 1 commits behind head on main.

Files Patch % Lines
py-polars/polars/io/database/_executor.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18277      +/-   ##
==========================================
- Coverage   80.21%   80.21%   -0.01%     
==========================================
  Files        1500     1500              
  Lines      198897   198897              
  Branches     2837     2837              
==========================================
- Hits       159547   159540       -7     
- Misses      38822    38829       +7     
  Partials      528      528              

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

@ritchie46 ritchie46 merged commit 3a9737c into pola-rs:main Aug 20, 2024
21 checks passed
@alexander-beedie alexander-beedie deleted the fix-duckdb-engine-version branch August 20, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

polars.read_database can not work with duckdb_engine connection.
2 participants