rtpsw commented on pull request #12338:
URL: https://github.com/apache/arrow/pull/12338#issuecomment-1047757562


   > Another reason is it duplicates `max_element_wise`, but with much fewer 
data types supported. I think it's better to augment existing kernel than 
inventing a new one.
   
   IIUC, your suggestion is to add the binary scalar kernels to the existing 
`max_element_wise` function. I scanned the Arrow codebase looking for a case 
where a `Function` was added kernels in more than one place, e.g. in 
`scalar_compare.cc` as in `max_element_wise` and in `scalar_arithmetic.cc` as 
in `maximum`, but didn't find such a case. I'm not sure how something like this 
would be implemented. It looks like in one place the function would need to get 
created with kernels and added to the registry and in another place get fetched 
from the registry and added additional kernels. This seems to require an 
annoying change like a predefined order of initialization across the 
`scalar_*.cc` files or the adding of a get-or-create method to the registry.


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