-
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
Remove unused binary_array_op_scalar!
in binary.rs
#2512
Conversation
cf40c4a
to
22efa7c
Compare
@@ -1142,6 +1079,20 @@ macro_rules! binary_array_op_dyn_scalar { | |||
}} | |||
} | |||
|
|||
/// Compares the array with the scalar value for equality, sometimes | |||
/// used in other kernels | |||
pub(crate) fn array_eq_scalar(lhs: &dyn Array, rhs: &ScalarValue) -> Result<ArrayRef> { |
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 made a function to call binary_array_op_dyn_scalar!
from null_if
rather than having it call the macro directly to clean that code up.
|
||
let array = primitive_bool_array_op!(lhs, *cond_array, nullif)?; | ||
|
||
Ok(ColumnarValue::Array(array)) | ||
} | ||
(ColumnarValue::Array(lhs), ColumnarValue::Array(rhs)) => { | ||
// Get args0 == args1 evaluated and produce a boolean array | ||
let cond_array = binary_array_op!(lhs, rhs, eq)?; | ||
let cond_array = eq_dyn(lhs, rhs)?; |
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.
Hooray for eq_dyn
thanks again @jimexist
22efa7c
to
18683d6
Compare
binary_array_op_scalar!
in binary.rsbinary_array_op_scalar!
in binary.rs
Draft until #2510 is mergedWhich issue does this PR close?
re #1179 and #2482 .
Rationale for this change
(the real reason for this is that I got nerd-sniped trying to clean up expression evaluation )
binary_array_op_scalar!
doesn't handle null constants (see fixNULL <op> column
evaluation, tests for same #2510)binary_array_op_dyn_scalar!
What changes are included in this PR?
binary_array_op_dyn_scalar!
Are there any user-facing changes?
No, all internal changes