matthewmturner commented on a change in pull request #984:
URL: https://github.com/apache/arrow-rs/pull/984#discussion_r760303658
##########
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:
@alamb ive been reviewing this but i think i might be missing something.
my understanding is that my code above is for getting the dictionary values,
which can be of any type (of course above im only handling `StringArray`).
```
let values = $left
.values()
.as_any()
.downcast_ref::<StringArray>()
.unwrap()
```
But then you mention using the new `dyn_xx` kernels / creating `dyn_xx_lit`
kernels. Since theres no actual compute being done here, what would the `dyn`
kernels be used for? Or were you referring to using the kernels to replace
more than just that section of code?
to me it looks like i need a macro to downcast `DictionaryArray.values()`
into whatever type the values are, and then i could use something like
`dyn_xx_lit` on that in order to get the comparison results. Is this roughly
what you had in mind?
--
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]