alamb commented on a change in pull request #1115: URL: https://github.com/apache/arrow-rs/pull/1115#discussion_r777108162
########## File path: arrow/src/compute/kernels/comparison.rs ########## @@ -1157,6 +1157,42 @@ where } } +/// Perform `left <= right` operation on an array and a numeric scalar +/// value. Supports PrimitiveArrays, and DictionaryArrays that have primitive values +pub fn lt_eq_dyn_scalar<T>(left: Arc<dyn Array>, right: T) -> Result<BooleanArray> +where + T: TryInto<i128> + Copy + std::fmt::Debug, +{ + match left.data_type() { + DataType::Dictionary(key_type, value_type) => match value_type.as_ref() { + DataType::Int8 + | DataType::Int16 + | DataType::Int32 + | DataType::Int64 + | DataType::UInt8 + | DataType::UInt16 + | DataType::UInt32 + | DataType::UInt64 => {dyn_compare_scalar!(&left, right, key_type, lt_eq_scalar)} + _ => Err(ArrowError::ComputeError( + "Kernel only supports PrimitiveArray or DictionaryArray with Primitive values".to_string(), Review comment: also here I think having the actual name of the kernel would help usability quite a lot -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org