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

Simplify ArrowNativeType #2841

Merged
merged 4 commits into from Oct 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions arrow/src/compute/kernels/arithmetic.rs
Expand Up @@ -2145,23 +2145,13 @@ mod tests {
}

#[test]
#[cfg(not(feature = "simd"))]
fn test_int_array_modulus_overflow_wrapping() {
let a = Int32Array::from(vec![i32::MIN]);
let b = Int32Array::from(vec![-1]);
let result = modulus(&a, &b).unwrap();
assert_eq!(0, result.value(0))
}

#[test]
Copy link
Contributor Author

@tustvold tustvold Oct 7, 2022

Choose a reason for hiding this comment

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

This was an undocumented bug that has now been fixed 🎉

Copy link
Member

Choose a reason for hiding this comment

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

what bug it is?

Copy link
Member

Choose a reason for hiding this comment

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

For example, it caught that the SIMD kernels were using the default %

This?

#[cfg(feature = "simd")]
#[should_panic(expected = "attempt to calculate the remainder with overflow")]
fn test_int_array_modulus_overflow_panic() {
let a = Int32Array::from(vec![i32::MIN]);
let b = Int32Array::from(vec![-1]);
let _ = modulus(&a, &b).unwrap();
}

#[test]
fn test_primitive_array_divide_scalar() {
let a = Int32Array::from(vec![15, 14, 9, 8, 1]);
Expand Down