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

fix: Output index type instead of u32 for sum_horizontal with boolean inputs #20531

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

mcrumiller
Copy link
Contributor

No description provided.

@mcrumiller mcrumiller changed the title Fix: Output index type instead of u32 for sum_horizontal with boolean inputs fix: Output index type instead of u32 for sum_horizontal with boolean inputs Jan 2, 2025
@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars and removed title needs formatting labels Jan 2, 2025
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.05%. Comparing base (ca36b66) to head (259e101).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #20531   +/-   ##
=======================================
  Coverage   79.05%   79.05%           
=======================================
  Files        1564     1564           
  Lines      220627   220628    +1     
  Branches     2502     2502           
=======================================
+ Hits       174413   174416    +3     
+ Misses      45640    45638    -2     
  Partials      574      574           

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

@@ -221,16 +255,7 @@ pub fn sum_horizontal(

// If we have any null columns and null strategy is not `Ignore`, we can return immediately.
if !ignore_nulls && non_null_cols.len() < columns.len() {
// We must first determine the correct return dtype.
let return_dtype = match dtypes_to_supertype(non_null_cols.iter().map(|c| c.dtype()))? {
DataType::Boolean => DataType::UInt32,
Copy link
Member

Choose a reason for hiding this comment

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

Can't we leave this code? (replacing indextype). I don't see much benefit in the extra functions that do an extra vec alloc and are only used once.

Copy link
Contributor Author

@mcrumiller mcrumiller Jan 3, 2025

Choose a reason for hiding this comment

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

Yes, sorry--I mixed up some of the temporal mean_horizontal code with this PR. Will fix.

I may have to re-introduce something similar in that PR but we can do that there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@ritchie46 ritchie46 merged commit da0b589 into pola-rs:main Jan 3, 2025
24 of 25 checks passed
@mcrumiller mcrumiller deleted the horz-sum branch January 3, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix 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