bkietz commented on a change in pull request #9294: URL: https://github.com/apache/arrow/pull/9294#discussion_r566366948
########## File path: cpp/src/arrow/compute/kernels/scalar_arithmetic.cc ########## @@ -264,10 +264,31 @@ ArrayKernelExec NumericEqualTypesBinary(detail::GetTypeId get_id) { } } +struct ArithmeticFunction : ScalarFunction { + using ScalarFunction::ScalarFunction; + + Result<const Kernel*> DispatchBest(std::vector<ValueDescr>* values) const override { Review comment: By default, DispatchBest is just an alias of DispatchExact. It must be overridden to specify allowed implicit casts. For example here I'm overriding it to allow arithmetic between numeric types (converting to the common numeric type). ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org