Skip to content

refactor(rust): Refactor coalesce_columns and add coalesce_binary_columns#27251

Open
mansanlab wants to merge 2 commits intopola-rs:mainfrom
mansanlab:patch-1
Open

refactor(rust): Refactor coalesce_columns and add coalesce_binary_columns#27251
mansanlab wants to merge 2 commits intopola-rs:mainfrom
mansanlab:patch-1

Conversation

@mansanlab
Copy link
Copy Markdown

@mansanlab mansanlab commented Apr 10, 2026

The new code fixes a bug where the null check was always evaluating incorrectly, meaning the early exit never fired as intended. It also adds several shortcuts to skip expensive operations when a column is null or has no nulls and handles scalar broadcasting that the old code ignored. This replaces the sequential loop with a parallel tree reduction for multi-column inputs, resolving the TODO comment the original author left behind.

make test before PR make test after PR

The new code fixes a bug where the null check was always evaluating incorrectly, meaning the early exit never fired as intended. It also adds several shortcuts to skip expensive operations when a column is null or has no nulls and handles scalar broadcasting that the old code ignored. This replaces the sequential loop with a parallel tree reduction for multi-column inputs, resolving the TODO comment the original author left behind.
@mansanlab mansanlab changed the title Refactor coalesce_columns and add coalesce_binary_columns fix(rust): Refactor coalesce_columns and add coalesce_binary_columns Apr 10, 2026
@github-actions github-actions bot added fix Bug fix rust Related to Rust Polars and removed title needs formatting labels Apr 10, 2026
@mansanlab mansanlab changed the title fix(rust): Refactor coalesce_columns and add coalesce_binary_columns refactor(rust): Refactor coalesce_columns and add coalesce_binary_columns Apr 10, 2026
@github-actions github-actions bot added the internal An internal refactor or improvement label Apr 10, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 88.09524% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.88%. Comparing base (86f9210) to head (cd933ad).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-ops/src/series/ops/horizontal.rs 88.09% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27251      +/-   ##
==========================================
+ Coverage   81.56%   81.88%   +0.31%     
==========================================
  Files        1820     1820              
  Lines      251061   251093      +32     
  Branches     3149     3149              
==========================================
+ Hits       204788   205601     +813     
+ Misses      45465    44684     -781     
  Partials      808      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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-contribution First contribution by user fix Bug fix internal An internal refactor or improvement rust Related to Rust Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant