matthewmturner commented on issue #1610:
URL: 
https://github.com/apache/arrow-datafusion/issues/1610#issuecomment-1018693672


   @alamb im not sure we can remove the type dispatch in 
`binary_primitive_array_op_scalar` since its used for other operations such as 
add / multiply / etc.  `binary_array_op_scalar` is used for all the operators 
we added `xx_dyn_scalar` kernels for as it handles primitive, utf8, decimal, 
timestamps, dates, etc.  It's my understanding that that is actually the macro 
that will need to be updated (or new one to take its place that uses dyn scalar 
kernels).
   
   Im still playing with it but I was thinking of adding new functions like 
`call_dyn_cmp_scalar`, `call_dyn_cmp_utf8_scalar`, etc (drawing inspirating 
from @liukun4515 in #1475) and then type dispatching based on if the data type 
of the array / data type of the values in dictionary array.  Roughly something 
like:
   
   ```
   if primitive_or_dict_vals_primitive {
       call_dyn_cmp_scalar(array, scalar, op)
   } else if string_or_dict_vals_string {
       call_dyn_cmp_utf8_scalar(array, scalar, op)
   } else {
       // Existing implementation for other types
   }
   ```
   
   Does this make sense?


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


Reply via email to