[ https://issues.apache.org/jira/browse/ARROW-15571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17487204#comment-17487204 ]
David Li edited comment on ARROW-15571 at 2/4/22, 5:54 PM: ----------------------------------------------------------- I think we're missing some terminology here. Note the Python functions are the exact same as the C++ ones. Rok's example can be translated to C++ and they both use the same implementation under the hood. Scalar functions operate on array and scalar values. "Scalar" just means that they operate elementwise. Aggregate functions reduce multiple values to one. It seems they are not what you are looking for here. However, again, note that min/max both have aggregate versions (min(array) -> scalar) and scalar versions (min(array, array) -> array or min(scalar, array) -> array or ...). So I think Rok's suggestion is what you are looking for. If performance is not up to par in benchmarks, then there is opportunity to optimize. (The scalar min/max kernels do some extra work because they take any number of arguments, for instance - though I don't recall if they have specializations for binary inputs.) was (Author: lidavidm): I think we're missing some terminology here. Note the Python functions are the exact same as the C++ ones. Rok's example can be translated to C++ and they both use the same implementation here. Scalar functions operate on array and scalar values. "Scalar" just means that they operate elementwise. Aggregate functions reduce multiple values to one. It seems they are not what you are looking for here. However, again, note that min/max both have aggregate versions (min(array) -> scalar) and scalar versions (min(array, array) -> array or min(scalar, array) -> array or ...). So I think Rok's suggestion is what you are looking for. If performance is not up to par in benchmarks, then there is opportunity to optimize. (The scalar min/max kernels do some extra work because they take any number of arguments, for instance - though I don't recall if they have specializations for binary inputs.) > [C++] Add min/max/sqrt scalar kernels to execution engine > --------------------------------------------------------- > > Key: ARROW-15571 > URL: https://issues.apache.org/jira/browse/ARROW-15571 > Project: Apache Arrow > Issue Type: Improvement > Components: C++ > Reporter: Yaron Gvili > Priority: Major > Labels: kernel, pull-request-available > Time Spent: 0.5h > Remaining Estimate: 0h > > The list of execution engine's scalar kernels currently available in > `cpp/src/arrow/compute/kernels/scalar_arithmetic.cc` does not cover the > common minimum, maximum, and square-root functions. -- This message was sent by Atlassian Jira (v8.20.1#820001)