tustvold opened a new issue, #2837: URL: https://github.com/apache/arrow-rs/issues/2837
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] (This section helps Arrow developers understand the context and *why* for this feature, in addition to the *what*) --> The `_dyn_scalar` comparison kernels accept a scalar value implementing `num::ToPrimitive` and then downcast the array, coercing the the scalar to the appropriate type. There are then further `dyn_utf8_scalar` and `dyn_binary_scalar` kernels to handle The `_scalar_dyn` arithmetic kernels are instead explicitly typed on `ArrowNumericType`, which is `ArrowPrimitiveType` with some SIMD gubbins, and accept the corresponding `T::Native` as a scalar argument. They then downcast to the expected `PrimitiveArray` or a `DictionaryArray` containing the corresponding `PrimitiveArray` Not only is the naming inconsistent, the comparison kernels will perform coercion of the scalar whereas the arithmetic kernels will not. **Describe the solution you'd like** <!-- A clear and concise description of what you want to happen. --> I think the approach of the arithmetic kernels is the least surprising, and as an added bonus is significantly simpler to implement. I would therefore like to propose adding new `[eq | lt_eq | ...]_dyn_primitive_scalar` comparison kernels, and deprecating the old `[eq | lt_eq | ...]_dyn_scalar` kernels, before removing them in a future release. **Describe alternatives you've considered** <!-- A clear and concise description of any alternative solutions or features you've considered. --> **Additional context** <!-- Add any other context or screenshots about the feature request here. --> The current use of `ToPrimitive` will likely complicate adding comparison support for decimal array (#2637) as ToPrimitive doesn't have a to_i256 method. -- 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]
