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

refactor(rust): Add WithRowIndexNode to new-streaming engine #19037

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented Sep 30, 2024

import numpy as np
import polars as pl
from timeit import timeit

n = 100_000_000
df = pl.DataFrame({"x": np.arange(n)})
query = df.lazy().with_row_index().select((pl.col.x * pl.col.index).sum())

print(timeit(lambda: query.collect(), number=50))
print(timeit(lambda: query.collect(streaming=True), number=50))
print(timeit(lambda: query.collect(new_streaming=True), number=50))
20.35326350000105
25.54412454200792
1.9409049579990096

@github-actions github-actions bot added internal An internal refactor or improvement rust Related to Rust Polars labels Sep 30, 2024
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 62 lines in your changes missing coverage. Please review.

Project coverage is 60.12%. Comparing base (64ca265) to head (fd279a9).
Report is 36 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-stream/src/nodes/with_row_index.rs 0.00% 60 Missing ⚠️
crates/polars-stream/src/physical_plan/lower_ir.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main   #19037       +/-   ##
===========================================
- Coverage   79.86%   60.12%   -19.75%     
===========================================
  Files        1524     1525        +1     
  Lines      207747   207829       +82     
  Branches     2908     2908               
===========================================
- Hits       165922   124960    -40962     
- Misses      41276    82320    +41044     
  Partials      549      549               

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46
Copy link
Member

@mcrumiller can you take another look at those tests? Or otherwise remove them?

@ritchie46 ritchie46 merged commit 9ee3fa2 into pola-rs:main Oct 1, 2024
20 of 21 checks passed
@c-peters c-peters added the accepted Ready for implementation label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation internal An internal refactor or improvement rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants