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): Move cast from polars-arrow to polars-compute #19967

Merged
merged 5 commits into from
Nov 25, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Nov 25, 2024

This needs to be moved first before we can move the gather kernels

@github-actions github-actions bot added internal An internal refactor or improvement rust Related to Rust Polars labels Nov 25, 2024
];
let array = Utf8Array::<i64>::from_slice(values);

let out = utf8_to_utf8view(&array);
// Ensure we hit the multiple buffers part.
assert_eq!(out.buffers().len(), 6);
assert_eq!(out.data_buffers().len(), 4);
Copy link
Collaborator Author

@nameexhaustion nameexhaustion Nov 25, 2024

Choose a reason for hiding this comment

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

this runs under cfg(test) which makes the OffsetType an i8

not sure how we ended up with 6 buffers before - I've left some working out above in comments

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 88.15789% with 18 lines in your changes missing coverage. Please review.

Project coverage is 79.46%. Comparing base (742c737) to head (73df990).
Report is 50 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-compute/src/cast/temporal.rs 93.54% 6 Missing ⚠️
crates/polars-compute/src/cast/utf8_to.rs 66.66% 6 Missing ⚠️
crates/polars-parquet/src/arrow/write/mod.rs 50.00% 2 Missing ⚠️
crates/polars-compute/src/cast/decimal_to.rs 0.00% 1 Missing ⚠️
crates/polars-compute/src/cast/primitive_to.rs 0.00% 1 Missing ⚠️
crates/polars-json/src/json/deserialize.rs 0.00% 1 Missing ⚠️
...rates/polars-parquet/src/arrow/write/dictionary.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #19967      +/-   ##
==========================================
- Coverage   79.46%   79.46%   -0.01%     
==========================================
  Files        1555     1556       +1     
  Lines      216322   216339      +17     
  Branches     2456     2456              
==========================================
  Hits       171911   171911              
- Misses      43853    43870      +17     
  Partials      558      558              

☔ 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 November 25, 2024 10:35
@ritchie46 ritchie46 merged commit ac9d3c6 into pola-rs:main Nov 25, 2024
20 checks passed
@c-peters c-peters added the accepted Ready for implementation label Dec 2, 2024
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
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants