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

refactor(rust): Remove extra schema traits #18616

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Sep 9, 2024

  • Move required methods to the main polars_schema::Schema<D> struct
  • Split impls for Schema<D>, most functions don't need D: Default + Clone

@github-actions github-actions bot added internal An internal refactor or improvement rust Related to Rust Polars labels Sep 9, 2024
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 95.55556% with 4 lines in your changes missing coverage. Please review.

Project coverage is 79.92%. Comparing base (aa3b2c3) to head (ada5f57).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...s/polars-pipe/src/executors/operators/reproject.rs 0.00% 3 Missing ⚠️
...ates/polars-plan/src/plans/conversion/dsl_to_ir.rs 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18616      +/-   ##
==========================================
- Coverage   79.94%   79.92%   -0.03%     
==========================================
  Files        1505     1506       +1     
  Lines      202579   203047     +468     
  Branches     2873     2889      +16     
==========================================
+ Hits       161958   162282     +324     
- Misses      40073    40215     +142     
- Partials      548      550       +2     

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

@nameexhaustion nameexhaustion marked this pull request as ready for review September 9, 2024 06:55
@ritchie46
Copy link
Member

Can you rebase?

@@ -26,7 +26,7 @@ pub fn lower_ir(
let output_schema = IR::schema_with_cache(node, ir_arena, schema_cache);
let node_kind = match ir_node {
IR::SimpleProjection { input, columns } => {
let columns = columns.get_names_owned();
let columns = columns.iter_names().cloned().collect::<Vec<_>>();
Copy link
Member

Choose a reason for hiding this comment

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

Given that we call this often, a utility method might save some code bloat. 👀

@ritchie46 ritchie46 merged commit 253057a into pola-rs:main Sep 9, 2024
19 checks passed
@c-peters c-peters added the accepted Ready for implementation label Sep 9, 2024
@nameexhaustion nameexhaustion deleted the schema-traits branch September 11, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation internal An internal refactor or improvement rust Related to Rust Polars
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants