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/05/26 14:36:51 UTC

[GitHub] [arrow] ianmcook edited a comment on pull request #10390: ARROW-12751: [C++] Implement minimum/maximum kernels

ianmcook edited a comment on pull request #10390:
URL: https://github.com/apache/arrow/pull/10390#issuecomment-848823194


   > Can you explain what the point is of a variadic function when we don't have e.g. variadic addition?
   
   My understanding is that we are aiming for Arrow's compute API to reach parity with the collections of built-in functions available in popular SQL engines. These SQL engines include several variadic functions that combine/merge/aggregate values row-wise. Two such SQL functions are `greatest()` and `least()`. The two kernels implemented in this PR are equivalent to those two SQL functions. Another such SQL function is `concat()` and its variant `concat_ws()`, which we intend to implement in ARROW-12709.
   
   There are two ways we could implement this functionality without implementing variadic functions:
   1. Chain multiple calls to a binary function (as is required for addition of more than two values, as you mention)
   2. Combine the arrays row-wise into a ListArray, then operate on the ListArray with a unary function (ARROW-12739)
   
   If one of those alternative approaches is superior, then perhaps we do not need a variadic function. But my current understanding is that both of these alternative approaches are inferior for reasons of usability and efficiency respectively.


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