You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/06/02 19:35:27 UTC

[GitHub] [arrow] bkietz commented on pull request #10364: ARROW-12074: [C++][Compute] Add scalar arithmetic kernels for decimal

bkietz commented on pull request #10364:
URL: https://github.com/apache/arrow/pull/10364#issuecomment-853329894


   `DispatchBest` is aware of the operation; it has access to the function's name. You could write a `CommonDecimal()` function which returns differing scales/precisions for "add"/"subtract", "divide", and "multiply":
   
   ```c++
   if (auto type = CommonNumeric(*values)) {
     ReplaceTypes(type, values);
   } else if (auto type = CommonDecimal(name_, *values)) {
     ReplaceTypes(type, values);
   }
   ```


-- 
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:
users@infra.apache.org