Skip to content

refactor(rust): Add generic tree traversal with edge value propagation#27249

Merged
ritchie46 merged 2 commits intomainfrom
nxs/expr-projection-height-2
Apr 16, 2026
Merged

refactor(rust): Add generic tree traversal with edge value propagation#27249
ritchie46 merged 2 commits intomainfrom
nxs/expr-projection-height-2

Conversation

@nameexhaustion
Copy link
Copy Markdown
Collaborator

@nameexhaustion nameexhaustion commented Apr 9, 2026

And use for expr height resolution / length-preserving resolution.

This should be generically re-usable for the following use cases:

  • AExpr property propagation (e.g. output height, sortedness, fully elementwise subtree, output dtypes).
  • IR property propagation (e.g. ordered/unordered, sortedness)
  • Topologically ordered IR optimizations (e.g. order optimizer, common projections / common predicates above caches).

--

@nameexhaustion nameexhaustion changed the base branch from main to nxs/expr-projection-height April 9, 2026 15:48
@github-actions github-actions bot added internal An internal refactor or improvement rust Related to Rust Polars title needs formatting labels Apr 9, 2026
@nameexhaustion nameexhaustion changed the title refactor(rust): refactor(rust): Add generic tree traversal with edge value propagation Apr 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

The uncompressed lib size after this PR is 58.8380 MB.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

The uncompressed lib size after this PR is 58.8377 MB.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 72.41379% with 72 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (nxs/expr-projection-height@662d1fb). Learn more about missing BASE report.

Files with missing lines Patch % Lines
crates/polars-utils/src/collection.rs 52.87% 41 Missing ⚠️
crates/polars-plan/src/traversal/tree_traversal.rs 77.94% 15 Missing ⚠️
crates/polars-utils/src/aliases.rs 0.00% 8 Missing ⚠️
crates/polars-plan/src/plans/aexpr/traverse.rs 77.77% 4 Missing ⚠️
...ates/polars-stream/src/physical_plan/lower_expr.rs 90.90% 4 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##             nxs/expr-projection-height   #27249   +/-   ##
=============================================================
  Coverage                              ?   81.88%           
=============================================================
  Files                                 ?     1823           
  Lines                                 ?   251386           
  Branches                              ?     3149           
=============================================================
  Hits                                  ?   205842           
  Misses                                ?    44736           
  Partials                              ?      808           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

The uncompressed lib size after this PR is 58.8381 MB.

@github-actions
Copy link
Copy Markdown
Contributor

The uncompressed lib size after this PR is 58.8366 MB.

@github-actions
Copy link
Copy Markdown
Contributor

The uncompressed lib size after this PR is 58.8362 MB.

@nameexhaustion nameexhaustion force-pushed the nxs/expr-projection-height-2 branch from 2d26193 to c492bc0 Compare April 11, 2026 15:37
@github-actions
Copy link
Copy Markdown
Contributor

The uncompressed lib size after this PR is 58.8362 MB.

@nameexhaustion nameexhaustion force-pushed the nxs/expr-projection-height branch from 662d1fb to 17e892d Compare April 14, 2026 09:10
@nameexhaustion nameexhaustion force-pushed the nxs/expr-projection-height-2 branch from c492bc0 to 352bd25 Compare April 14, 2026 09:11
@github-actions
Copy link
Copy Markdown
Contributor

The uncompressed lib size after this PR is 61.4685 MB.

Base automatically changed from nxs/expr-projection-height to main April 15, 2026 13:29
@nameexhaustion nameexhaustion force-pushed the nxs/expr-projection-height-2 branch from 352bd25 to 7de45c2 Compare April 15, 2026 13:48
@github-actions
Copy link
Copy Markdown
Contributor

The uncompressed lib size after this PR is 60.8554 MB.

@nameexhaustion nameexhaustion force-pushed the nxs/expr-projection-height-2 branch from 028a364 to 56074cb Compare April 16, 2026 11:47
@nameexhaustion nameexhaustion marked this pull request as ready for review April 16, 2026 12:00
@github-actions
Copy link
Copy Markdown
Contributor

The uncompressed lib size after this PR is 60.6824 MB.

@ritchie46 ritchie46 merged commit f81f8f8 into main Apr 16, 2026
26 of 27 checks passed
@ritchie46 ritchie46 deleted the nxs/expr-projection-height-2 branch April 16, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement rust Related to Rust Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants