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: Fix comparison of UInt64 with zero #16799

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

nameexhaustion
Copy link
Collaborator

Fixes #16798

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jun 7, 2024
@@ -288,7 +288,7 @@ pub fn get_supertype(l: &DataType, r: &DataType) -> Option<DataType> {
}
// dyn int vs number
else {
let smallest_fitting_dtype = if dt.is_unsigned_integer() && v.is_positive() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

issue was here, is_positive doesn't include zero

Copy link

codspeed-hq bot commented Jun 7, 2024

CodSpeed Performance Report

Merging #16799 will improve performances by 16.08%

Comparing nameexhaustion:uint64-zero-cmp (b7bdb29) with main (fd4c71e)

Summary

⚡ 1 improvements
✅ 36 untouched benchmarks

Benchmarks breakdown

Benchmark main nameexhaustion:uint64-zero-cmp Change
test_tpch_q4 5.3 ms 4.6 ms +16.08%

@ritchie46 ritchie46 merged commit fee68e3 into pola-rs:main Jun 7, 2024
26 of 27 checks passed
@nameexhaustion nameexhaustion deleted the uint64-zero-cmp branch June 11, 2024 16:25
Wouittone pushed a commit to Wouittone/polars that referenced this pull request Jun 22, 2024
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.

Comparing 0 with UInt64 values larger than Int64::MAX incorrectly return NULL
2 participants