8000 perf: Return references from `aexpr_to_leaf_names_iter` by JakubValtar · Pull Request #25319 · pola-rs/polars · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@JakubValtar
Copy link
Collaborator

This should avoid cloning in a few places.

@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels Nov 13, 2025
Comment on lines +248 to +251
arena: &'_ Arena<AExpr>,
) -> impl Iterator<Item = &'_ PlSmallStr> + '_ {
aexpr_to_column_nodes_iter(node, arena).map(|node| match arena.get(node.0) {
AExpr::Column(name) => name.clone(),
AExpr::Column(name) => name,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: This is the main change.

Comment on lines -260 to -261
pub fn aexpr_to_leaf_name(node: Node, arena: &Arena<AExpr>) -> PlSmallStr {
aexpr_to_leaf_names_iter(node, arena).next().unwrap()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I removed this one, it is not used.

@codecov
Copy link
codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.93%. Comparing base (c28a0b2) to head (a4818b0).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...an/src/plans/optimizer/predicate_pushdown/utils.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25319      +/-   ##
==========================================
- Coverage   81.95%   81.93%   -0.02%     
==========================================
  Files        1712     1712              
  Lines      237225   237224       -1     
  Branches     3011     3011              
==========================================
- Hits       194417   194371      -46     
- Misses      42035    42080      +45     
  Partials      773      773              

☔ 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.

@JakubValtar JakubValtar merged commit 2f6d6d9 into pola-rs:main Nov 13, 2025
25 checks passed
@JakubValtar JakubValtar deleted the leaf-names-iter-ref branch November 13, 2025 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0