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

Implement Hypothetical-Set Aggregate Functions

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0
    • Component/s: UDF
    • Labels:
      None

      Description

      <hypothetical set function> ::=
        <rank function type> <left paren>
        <hypothetical set function value expression list> <right paren>
        <within group specification>
      
      <rank function type> ::=
        RANK
        | DENSE_RANK
        | PERCENT_RANK
        | CUME_DIST
      

      Example:

      CREATE TABLE table1 (column1 int);
      INSERT INTO table1 VALUES (NULL), (3), (8), (13), (7), (6), (20), (NULL), (NULL), (10), (7), (15), (16), (8), (7), (8), (NULL);
      
      SELECT rank(6) WITHIN GROUP (ORDER BY column1) FROM table1;
      
      2
      

        Attachments

        1. HIVE-22292.1.patch
          90 kB
          Krisztian Kasa
        2. HIVE-22292.2.patch
          97 kB
          Krisztian Kasa
        3. HIVE-22292.3.patch
          97 kB
          Krisztian Kasa
        4. HIVE-22292.4.patch
          98 kB
          Krisztian Kasa
        5. HIVE-22292.5.patch
          98 kB
          Krisztian Kasa
        6. HIVE-22292.6.patch
          98 kB
          Krisztian Kasa
        7. HIVE-22292.7.patch
          98 kB
          Krisztian Kasa
        8. HIVE-22292.7.patch
          98 kB
          Krisztian Kasa
        9. HIVE-22292.8.patch
          98 kB
          Krisztian Kasa
        10. HIVE-22292.8.patch
          98 kB
          Krisztian Kasa
        11. HIVE-22292.8.patch
          98 kB
          Krisztian Kasa
        12. HIVE-22292.8.patch
          98 kB
          Krisztian Kasa

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              kkasa Krisztian Kasa Assign to me
              Reporter:
              kkasa Krisztian Kasa

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment