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(rust,python): Fix possibly incorrect order of columns when using ipc stream with_columns #14859

Conversation

mickvangelderen
Copy link
Contributor

No description provided.

@github-actions github-actions bot added internal An internal refactor or improvement rust Related to Rust Polars labels Mar 5, 2024
stinodego
stinodego previously approved these changes Mar 6, 2024
Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

Good catch!

@stinodego stinodego dismissed their stale review March 6, 2024 08:33

Actually, looks like this now results in a test failure - seems like we'll have to fix the bug or skip this test for now and fix it later. The addition of assert is good regardless.

@mickvangelderen mickvangelderen force-pushed the fix-missing-test-assertions-in-ipc-stream branch from f6d7bac to 60af176 Compare March 6, 2024 12:58
@mickvangelderen mickvangelderen changed the title test(rust): Fix missing test assertions in ipc_stream fix(rust,python): Fix possibly incorrect order of columns when using ipc stream with_columns Mar 6, 2024
@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Mar 6, 2024
@mickvangelderen
Copy link
Contributor Author

@stinodego the failing tests indicated an actual problem. I've addressed this now.

The commits are pretty decent so this can be reviewed on a per-commit basis.

@stinodego stinodego removed the internal An internal refactor or improvement label Mar 6, 2024
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

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

Project coverage is 81.01%. Comparing base (6a181f2) to head (a1f6199).
Report is 7 commits behind head on main.

Files Patch % Lines
crates/polars-core/src/testing.rs 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14859      +/-   ##
==========================================
+ Coverage   80.98%   81.01%   +0.02%     
==========================================
  Files        1331     1331              
  Lines      172525   172752     +227     
  Branches     2455     2455              
==========================================
+ Hits       139720   139955     +235     
+ Misses      32337    32329       -8     
  Partials      468      468              

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

@mickvangelderen
Copy link
Contributor Author

mickvangelderen commented Mar 7, 2024

@ritchie46 I would like to move this forward and would like to get your input on the following:

  • is fixing the column order a breaking change?
  • is there anything else you'd like to see done before merging?

fn assert_df_eq_passes() {
let df = df!("a" => [1], "b" => [2]).unwrap();
assert_df_eq!(df, df);
drop(df); // Ensure `assert_df_eq!` does not consume its arguments.
Copy link
Member

Choose a reason for hiding this comment

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

Does assert_eq take a ref by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so, although it is not entirely obvious to me why the implementation of assert_eq is what it is.

@ritchie46
Copy link
Member

is fixing the column order a breaking change?

No, it's a fix.

@mickvangelderen mickvangelderen merged commit 6188cbf into pola-rs:main Mar 8, 2024
23 checks passed
@mickvangelderen mickvangelderen deleted the fix-missing-test-assertions-in-ipc-stream branch March 8, 2024 09:05
@c-peters c-peters added the accepted Ready for implementation label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants