liukun4515 commented on a change in pull request #1131:
URL: https://github.com/apache/arrow-rs/pull/1131#discussion_r778510827



##########
File path: arrow/src/compute/kernels/comparison.rs
##########
@@ -1454,6 +1454,81 @@ pub fn eq_dyn_bool_scalar(left: Arc<dyn Array>, right: 
bool) -> Result<BooleanAr
     result
 }
 
+/// Perform `left < right` operation on an array and a numeric scalar
+/// value. Supports BooleanArrays, and DictionaryArrays that have string values
+pub fn lt_dyn_bool_scalar(left: Arc<dyn Array>, right: bool) -> 
Result<BooleanArray> {
+    let result = match left.data_type() {
+        DataType::Boolean => {
+            let left = as_boolean_array(&left);
+            lt_bool_scalar(left, right)
+        }
+        _ => Err(ArrowError::ComputeError(
+            "Kernel only supports BooleanArray".to_string(),

Review comment:
       It's better to add the operation name in the error message.




-- 
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]


Reply via email to