Add (simd) modulus op#317
Conversation
|
After this PR is merged, I will submit a new PR to |
|
@jorgecarleitao First-time contributors need a maintainer to approve running workflows. |
| let null_bit_buffer = | ||
| combine_option_bitmap(left.data_ref(), right.data_ref(), left.len())?; | ||
|
|
||
| let buffer = if let Some(b) = &null_bit_buffer { |
There was a problem hiding this comment.
It might be better to check if the null count > 0, as there could be a buffer even though all values are non-null
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #317 +/- ##
==========================================
+ Coverage 82.52% 82.59% +0.06%
==========================================
Files 162 162
Lines 44007 44344 +337
==========================================
+ Hits 36316 36624 +308
- Misses 7691 7720 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| let a = Int32Array::from(vec![15, 15, 8, 1, 9]); | ||
| let b = Int32Array::from(vec![5, 6, 8, 9, 1]); | ||
| let c = modulus(&a, &b).unwrap(); | ||
| assert_eq!(0, c.value(0)); |
There was a problem hiding this comment.
It is possible to compare the c in fewer lines using something like assert_eq!(c, Int32Array:from(vec![3. 0, 2, 3, 4]), which also has the advantage if ensuring that c.len() == 5. This way is fine too
|
Can anyone merge this PR so that I can proceed with other PR in arrow-datafusion? @alamb @jorgecarleitao |
|
Sorry @gangliao ! |
* Add (simd) modulus op * fix typo * fix feature = "simd" * revert ModulusByZero
Which issue does this PR close?
#98
apache/datafusion#99
Rationale for this change
What changes are included in this PR?
support modulus operations.
Are there any user-facing changes?
no.