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: Incorrectly preserved sorted flag when concatenating sorted series containing nulls #15082

Merged
merged 7 commits into from
Mar 15, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Mar 15, 2024

Fixes #15072.

Existing releases are incorrectly setting the sorted flag:

s = pl.Series([None, 1])
out = pl.concat(3 * [s.sort()])
print(out)
shape: (4,)
Series: '' [i64]
[
        null
        1
        null
        1
]
print(out.flags)
{'SORTED_ASC': True, 'SORTED_DESC': False}
               ^^^^

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Mar 15, 2024
@nameexhaustion nameexhaustion changed the title fix: Fix incorrectly preserved sorted flag when concatenating series with nulls fix: Fix incorrectly preserved sorted flag when concatenating sorted series containing nulls Mar 15, 2024
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 95.45455% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 81.03%. Comparing base (f08914b) to head (7f6c851).
Report is 5 commits behind head on main.

Files Patch % Lines
crates/polars-core/src/chunked_array/mod.rs 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15082      +/-   ##
==========================================
- Coverage   81.04%   81.03%   -0.02%     
==========================================
  Files        1338     1338              
  Lines      173771   173792      +21     
  Branches     2456     2456              
==========================================
- Hits       140832   140828       -4     
- Misses      32471    32496      +25     
  Partials      468      468              

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

@nameexhaustion nameexhaustion changed the title fix: Fix incorrectly preserved sorted flag when concatenating sorted series containing nulls fix: Incorrectly preserved sorted flag when concatenating sorted series containing nulls Mar 15, 2024
@nameexhaustion nameexhaustion marked this pull request as ready for review March 15, 2024 08:03
@nameexhaustion nameexhaustion marked this pull request as draft March 15, 2024 08:25
@nameexhaustion nameexhaustion marked this pull request as ready for review March 15, 2024 09:14
Copy link
Member

@ritchie46 ritchie46 left a comment

Choose a reason for hiding this comment

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

Thank you @nameexhaustion

@ritchie46 ritchie46 merged commit b9a5603 into pola-rs:main Mar 15, 2024
23 checks passed
@nameexhaustion nameexhaustion deleted the concat-sflag branch March 15, 2024 13:07
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.

concat failure in 0.20.16rc
2 participants