viirya commented on code in PR #2830:
URL: https://github.com/apache/arrow-rs/pull/2830#discussion_r989207792
##########
arrow/src/datatypes/native.rs:
##########
@@ -46,6 +46,7 @@ pub(crate) mod native_op {
+ Div<Output = Self>
+ Rem<Output = Self>
+ Zero
+ + num::ToPrimitive
Review Comment:
I put `is_eq`, `is_ne`..APIs into `ArrowNativeTypeOp`. If I don't add this
addition, the compilier complains:
```
error[E0599]: no method named `to_f64` found for type parameter `T` in the
current scope
--> arrow/src/compute/kernels/comparison.rs:1228:50
|
1228 | let right = try_to_type!($RIGHT, to_f64)?;
| ^^^^^^ method not
found in `T`
...
1338 | pub fn eq_dyn_scalar<T>(left: &dyn Array, right: T) ->
Result<BooleanArray>
| - method `to_f64` not found for this type
parameter
...
1340 | T: ArrowNativeTypeOp + num::ToPrimitive,
| ++++++++++++++++++
```
So I pull the type bound `num::ToPrimitive` into `ArrowNativeTypeOp`.
I made all dyn_scalar kernels use `ArrowNativeTypeOp` now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]