Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-894

Add UDAFs max_n(), min_n() to contrib

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.6.0
    • UDF
    • None
    • Reviewed

    Description

      These 2 UDAFs should return the max n numbers, min n numbers in order.

      SELECT max_n(userid, 3) FROM src;
      [999,997,996]
      SELECT max_n(userid, 3)[1] FROM src;
      997
      SELECT min_n(userid, 3) FROM src;
      [0, 3, 8]
      SELECT min_n(userid, 3)[2] FROM src;
      8
      

      Attachments

        1. HIVE-894.3.patch
          23 kB
          Zheng Shao
        2. HIVE-894.2.patch
          21 kB
          Zheng Shao
        3. HIVE-894.1.patch
          21 kB
          Bill Jia
        4. HIVE-894.1.patch
          23 kB
          Bill Jia

        Activity

          People

            zshao Zheng Shao
            zshao Zheng Shao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: