-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Integrate polars in get_df, get_df_by_chunks
#48875
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ef67fa3 to
5bc13cd
Compare
get_df and get_polar_dfget_df and get_polars_df
03d83ec to
8c11d33
Compare
8c11d33 to
ec36e47
Compare
eladkal
reviewed
Apr 11, 2025
providers/common/sql/src/airflow/providers/common/sql/hooks/sql.py
Outdated
Show resolved
Hide resolved
188c1fd to
0604217
Compare
0604217 to
1320fa4
Compare
9d6f704 to
2036fef
Compare
eladkal
reviewed
Apr 11, 2025
providers/common/sql/src/airflow/providers/common/sql/hooks/sql.py
Outdated
Show resolved
Hide resolved
8dd9cdb to
1fca7de
Compare
Member
Author
|
@eladkal Hi, I have updated PR with your suggestion thanks for you reviewing~ |
a9d0b0f to
2649bb6
Compare
eladkal
reviewed
Apr 15, 2025
eladkal
reviewed
Apr 15, 2025
eladkal
approved these changes
Apr 15, 2025
Contributor
eladkal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-Authored-By: Elad Kalif <45845474+eladkal@users.noreply.github.com>
3fe0ac6 to
ae651a8
Compare
This was referenced Apr 16, 2025
56 tasks
polars in get_df, get_df_by_chunkspolars in get_df, get_df_by_chunks
This was referenced May 1, 2025
This was referenced May 11, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue and PR
closes: #33911
cc: @eladkal @Taragolis @bfeif
Why
This PR addresses the ongoing discussion regarding the introduction of a generic
get_dffunction, which would abstract the retrieval of dataframes from various sources, supporting both pandas and polars. The goal is to provide a more user-friendly and consistent API.As discussed, there are arguments against a direct implementation, primarily concerning:
There is also support for a more abstract approach:
get_dfcould simplify user interaction and provide a consistent interface.How
This PR implements
get_dfwhile maintaining a flexible approach to address the community's concerns.get_dfis introduced as a new, generic function that accepts a parameter specifying the desired dataframe type (pandas or polars)._get_polars_dfand_get_pandas_dfmethods that are used within theget_dfmethod. This allows the new generic method to function, while allowing the option to expose or deprecate the underlying methods in the future.This PR aims to provide a flexible solution that can be adapted based on community consensus. The implementation can be refined or reverted as needed, ensuring that the changes align with the project's long-term goals.
Note
This PR is considered a starting point for discussion and may require further triage by the community. I plan to implement the corresponding changes within the Google provider after this PR is reviewed and a consensus is reached, as it is dependent on the outcome of this discussion. This separation allows for focused review and iteration on the core functionality before extending it to specific providers.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.