-
Notifications
You must be signed in to change notification settings - Fork 422
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 sql() and show() convenience method to QueryBuilder #3100
feat(python): add sql() and show() convenience method to QueryBuilder #3100
Conversation
ACTION NEEDED delta-rs follows the Conventional Commits specification for release automation. The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. |
ac92f90
to
9ce60c5
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3100 +/- ##
==========================================
- Coverage 72.52% 72.51% -0.01%
==========================================
Files 128 128
Lines 41201 41201
Branches 41201 41201
==========================================
- Hits 29882 29878 -4
- Misses 9408 9412 +4
Partials 1911 1911 ☔ View full report in Codecov by Sentry. |
@DevChrisCross the .SQL() should rather give an object that's lazy executed, similar to duckdb's python API: https://duckdb.org/docs/api/python/reference/ You can see the method .SQL() and .show() there |
for what is worth it, instead of qb.show().execute(query) |
17ad1cf
to
a3bc9ef
Compare
I've introduced a QueryResult class to accommodate the lazy execution, and in turn, introduced fetchall() as well, let me know if it is okay @ion-elgreco @djouallah |
do you mind adding qb.sql(query).show() too please |
Ah yes, that was already added as well :) |
a518e32
to
fd56cf4
Compare
@DevChrisCross looks good, perhaps also add a to_arrow() which returns a pyarrow table and to_pandas() on it as well : ) |
Signed-off-by: Christian Molina <[email protected]>
I am squashing this and will then merge, I love seeing more improvements here 😄 |
fd56cf4
to
a420c33
Compare
@rtyler Oh it was merged already? I was initially trying to accommodate comments @ion-elgreco regarding the to_arrow and to_pandas methods 😅 Is it still needed? |
@DevChrisCross I think those are good ideas to add in additional pull requests 😄 |
Description
Adds user friendly methods, namely sql() and show() to the QueryBuilder
Related Issue(s)
Documentation