Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-12751

[C++] Add variadic row-wise min/max kernels (least/greatest)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 5.0.0
    • C++

    Description

      Add a pair of variadic functions equivalent to SQL's least/greatest or R's pmin/pmax. Should take 0, 1, 2, ... same-length numeric arrays as input and return an array giving the minimum/maximum of the values found in each position of the input arrays. For example, in the case of these 2 input arrays:

      Array<double>        Array<double>
      [                    [
        1,                   2,
        4                    3
      ]                    ]
      

      least would return:

      Array<double>
      [ 
        1,
        3
      ] 
      

      and greatest would return

      Array<double>
      [ 
        2,
        4
      ] 
      

      The returned array should have the same data type as the input arrays, or follow promotion rules if the numeric types of the input arrays differ.

      Should also accept scalar numeric inputs and recycle their values.

      Attachments

        Issue Links

          Activity

            People

              lidavidm David Li
              icook Ian Cook
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 8h
                  8h