-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use arrow kernels for bitwise operations #6098
Conversation
@@ -5117,31 +5117,31 @@ mod tests { | |||
let left = Arc::new(Int32Array::from(vec![Some(12), None, Some(11)])) as ArrayRef; | |||
let right = | |||
Arc::new(Int32Array::from(vec![Some(1), Some(3), Some(7)])) as ArrayRef; | |||
let mut result = bitwise_and(left.clone(), right.clone())?; | |||
let mut result = bitwise_and_dyn(left.clone(), right.clone())?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed these kernels to match the naming scheme in arrow-rs (where _dyn
is used to refer to kernels that take ArrayRef
create_dyn_kernel!(bitwise_xor_dyn, bitwise_xor); | ||
create_dyn_kernel!(bitwise_and_dyn, bitwise_and); | ||
|
||
pub(crate) fn bitwise_shift_right_dyn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly there are no shift_right or shift_left in arrows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also found the upstream tracking ticket in arrow -- apache/arrow-rs#2741 and added links in the code here
Co-authored-by: Liang-Chi Hsieh <[email protected]>
Which issue does this PR close?
Related to #6066
Rationale for this change
While reviewing #6093 from @RTEnzyme I noticed there were kernels in arrow-rs for some of the bitwise operations: https://docs.rs/arrow/latest/arrow/compute/kernels/bitwise/index.html
What changes are included in this PR?
Use the kernels from arrow-rs rather than redefining them in datafusion
Are these changes tested?
Covered by existing tests
Are there any user-facing changes?
No