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 test_unaligned_bit_chunk_iterator on aarch64 #1297

Merged
merged 3 commits into from
Feb 10, 2022

Conversation

tustvold
Copy link
Contributor

Which issue does this PR close?

Closes #1294

Rationale for this change

Test should pass

What changes are included in this PR?

Fix test

Are there any user-facing changes?

No, this only changes a test

@github-actions github-actions bot added the arrow Changes to the arrow crate label Feb 10, 2022
@tustvold
Copy link
Contributor Author

I have tested this on an aarch64 M1 Mac and it now passes 😀

@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2022

Codecov Report

Merging #1297 (bd8a37c) into master (39f3f71) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1297   +/-   ##
=======================================
  Coverage   83.01%   83.01%           
=======================================
  Files         180      180           
  Lines       52715    52731   +16     
=======================================
+ Hits        43760    43774   +14     
- Misses       8955     8957    +2     
Impacted Files Coverage Δ
arrow/src/util/bit_chunk_iterator.rs 93.83% <100.00%> (+0.35%) ⬆️
arrow/src/array/transform/mod.rs 84.51% <0.00%> (-0.26%) ⬇️
parquet/src/encodings/encoding.rs 93.52% <0.00%> (-0.20%) ⬇️
parquet_derive/src/parquet_field.rs 66.21% <0.00%> (+0.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39f3f71...bd8a37c. Read the comment docs.

@tustvold tustvold force-pushed the fix-unaligned-bit-chunk-test branch from 1c46241 to 5493bd9 Compare February 10, 2022 10:06
@@ -466,9 +466,6 @@ mod tests {
#[test]
#[allow(clippy::assertions_on_constants)]
fn test_unaligned_bit_chunk_iterator() {
// This test exploits the fact Buffer is at least 64-byte aligned
assert!(ALIGNMENT > 64);
Copy link
Contributor Author

@tustvold tustvold Feb 10, 2022

Choose a reason for hiding this comment

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

The derp here is strong. The test requires that Buffer is 64 bit aligned, not 64 byte aligned 🤦

As an added bonus, even if it did care, this should be >=

@@ -520,6 +516,13 @@ mod tests {
assert_eq!(unaligned.suffix(), None);

let buffer = Buffer::from(&[0xFF; 14]);

// Verify buffer alignment
let (prefix, aligned, suffix) = unsafe { buffer.as_slice().align_to::<u64>() };
Copy link
Contributor Author

@tustvold tustvold Feb 10, 2022

Choose a reason for hiding this comment

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

Technically align_to is not guaranteed to return the maximal aligned slice. In practice we rely on this in so many places, this is what the current upstream implementation will do, and any other behaviour would be extremely contrived.

@alamb
Copy link
Contributor

alamb commented Feb 10, 2022

@nevi-me would you like me to spin up a new RC with this change?

Edit: or are you comfortable with releasing 9.0.3 given that this is only a test issue?

@alamb alamb merged commit 8f7c56e into apache:master Feb 10, 2022
@alamb alamb added the development-process Related to development process of arrow-rs label Feb 10, 2022
@alamb alamb changed the title Fix test_unaligned_bit_chunk_iterator Fix test_unaligned_bit_chunk_iterator on aarch64 Feb 10, 2022
@nevi-me
Copy link
Contributor

nevi-me commented Feb 10, 2022

@nevi-me would you like me to spin up a new RC with this change?

Edit: or are you comfortable with releasing 9.0.3 given that this is only a test issue?

I'm away from my laptop, I didn't see if the failure prevented other crates from running, or if they ran. I'll confirm this evening (in about 4-5 hours).

I don't think cutting another RC would be necessary. Thanks @alamb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate development-process Related to development process of arrow-rs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure: bit_chunk_iterator
5 participants