alamb commented on a change in pull request #984:
URL: https://github.com/apache/arrow-rs/pull/984#discussion_r760595599



##########
File path: arrow/src/compute/kernels/comparison.rs
##########
@@ -200,6 +201,42 @@ macro_rules! compare_op_scalar_primitive {
     }};
 }
 
+macro_rules! compare_dict_op_scalar {
+    ($left:expr, $right:expr, $op:expr) => {{
+        let null_bit_buffer = $left
+            .data()
+            .null_buffer()
+            .map(|b| b.bit_slice($left.offset(), $left.len()));
+
+        let values = $left
+            .values()
+            .as_any()
+            .downcast_ref::<StringArray>()

Review comment:
       I am very sorry for confusing this conversation with mentioning 
`dyn_xx_lit`. 
   
   What I was (inarticulately) trying to say was that once you have 
`eq_dict_scalar` (and you will likely also need `eq_dict_scalar_utf8`) we will 
end up with several different ways to compare an array to a scalar, depending 
on the array type
   
   So I was thinking ahead to adding functions like
   
   ```rust
   fn eq_scalar_utf8_dyn(array: dyn &Array, right: &str) -> Boolean {
     // do dispatch to the right kernel based on type of array
   }
   ```
   
   But definitely not for this PR




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