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): Add "execute_options" support for read_database_uri #14682

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Feb 25, 2024

Closes #14631.

The adbc engine only has limited support for "execute_options" (and connectorx has no support at all), but we can still make the API more consistent for those cases where such options are valid (such as use of "parameters" with the adbc engine and a SQLite backend).

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Feb 25, 2024
@alexander-beedie alexander-beedie force-pushed the read-database-uri-execute-options branch 2 times, most recently from 033722f to d4304b6 Compare February 28, 2024 05:04
Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.01%. Comparing base (3cf4897) to head (92a5151).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14682   +/-   ##
=======================================
  Coverage   81.01%   81.01%           
=======================================
  Files        1331     1331           
  Lines      172773   172776    +3     
  Branches     2455     2456    +1     
=======================================
+ Hits       139966   139972    +6     
+ Misses      32339    32337    -2     
+ Partials      468      467    -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.

In favor of adding execute_options 👍

Why does connectorx not support this?

py-polars/polars/io/database.py Outdated Show resolved Hide resolved
py-polars/tests/unit/io/test_database_read.py Outdated Show resolved Hide resolved
@alexander-beedie
Copy link
Collaborator Author

Why does connectorx not support this?

They have an open issue about it here... sfu-db/connector-x#208 ...which includes a mention about why it's a bit tricky to implement.

@alexander-beedie alexander-beedie force-pushed the read-database-uri-execute-options branch from d4304b6 to 9729e04 Compare March 4, 2024 19:29
@alexander-beedie alexander-beedie force-pushed the read-database-uri-execute-options branch from b07e744 to 92a5151 Compare March 7, 2024 13:57
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.

All right, good to go!

@alexander-beedie alexander-beedie merged commit dd88342 into pola-rs:main Mar 7, 2024
12 checks passed
@alexander-beedie alexander-beedie deleted the read-database-uri-execute-options branch March 7, 2024 14:40
@alexander-beedie alexander-beedie changed the title feat(python): add "execute_options" support for read_database_uri feat(python): Add "execute_options" support for read_database_uri Mar 8, 2024
@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 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.

Make read_database and read_database_uri consistent
2 participants