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(rust, python): Streaming joins architecture and Cross join implementation. #5339

Merged
merged 10 commits into from
Oct 31, 2022

Conversation

ritchie46
Copy link
Member

@ritchie46 ritchie46 commented Oct 26, 2022

This sets up the fundamentals of the new out of core query engine. This sets up the architecture for joins and stitches those arbitrary complex query trees together.

I am really happy with this setup, as I think this was the most complicated part of the new engine. Adding the other joins is simply a matter of implementing the proper algorithms.

And as a proof of concept we have a very successful run, streaming through 160GB of data in 15 seconds.

image

closes #5124

@ritchie46 ritchie46 changed the title WIP ooc join feat(rust, python): Streaming joins architecture and Cross join implementation. Oct 31, 2022
@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Oct 31, 2022
@rjavadi
Copy link

rjavadi commented Jun 24, 2024

I tried the example above with a different filtering condition:

df = (
    lf.join(lf, how="cross")
    .filter((pl.sum_horizontal(pl.col("*")) < 100_000))
)

The explain() output shows that the filtering is inside streaming block, but it fails and causes memory overflow:

--- STREAMING
FILTER [(col("a").sum_horizontal([col("a_right")])) < (100000.0)] FROM
CROSS JOIN:
LEFT PLAN ON: []
  DF ["a"]; PROJECT */1 COLUMNS; SELECTION: "None"
RIGHT PLAN ON: []
  DF ["a"]; PROJECT */1 COLUMNS; SELECTION: "None"
END CROSS JOIN  --- END STREAMING

Does this feature work for window functions such as sum_horizontal?

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 rust Related to Rust Polars
Projects
None yet
2 participants