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

Update pandas queries #104

Merged
merged 13 commits into from
Apr 12, 2024
Merged

Update pandas queries #104

merged 13 commits into from
Apr 12, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Apr 11, 2024

Closes #96

This updates the pandas queries to remove any manual optimizations. No more join reordering and no more pre-selecting relevant columns.

This should make it closer to the original SQL query.

@stinodego stinodego marked this pull request as ready for review April 11, 2024 11:54
@MarcoGorelli
Copy link
Contributor

MarcoGorelli commented Apr 11, 2024

Generally looks good - I haven't checked through every line carefully, but I have tried running these, and now the timings of "pandas running native queries" and "pandas running Polars queries via Narwhals" are aligned:

image

Before, for Q2, "pandas native" was 4 times faster than "pandas via Narwhals" - I thought it was a bug in Narwhals, but it turned out was all the manual reordering of operations 😄 I think the small differences that remain are statistical error

@stinodego
Copy link
Member Author

Thanks for checking, @MarcoGorelli ! I updated pandas/Dask/Modin with the new queries.

@stinodego stinodego merged commit 0c2a359 into main Apr 12, 2024
2 checks passed
@stinodego stinodego deleted the pandas-update branch April 12, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update pandas queries to better match original SQL queries
2 participants