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

first_value can't have more than one order by column

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 2.1.0
    • Component/s: SQL
    • Labels:

      Description

      In the current implementation of the first_value function, it's not allowed to have more than one (1) order by column, as so:

      select distinct
      first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by kastr.DETRADT, kastr.DEVPDNR )
      from RTAVP_DRKASTR kastr
      ;

      Error given:

      FAILED: SemanticException Range based Window Frame can have only 1 Sort Key

        Attachments

        1. HIVE-4662.01.patch
          60 kB
          Jesus Camacho Rodriguez
        2. HIVE-4662.01.patch
          60 kB
          Jesus Camacho Rodriguez
        3. HIVE-4662.01.patch
          57 kB
          Jesus Camacho Rodriguez
        4. HIVE-4662.patch
          57 kB
          Jesus Camacho Rodriguez

          Issue Links

            Activity

              People

              • Assignee:
                jcamachorodriguez Jesus Camacho Rodriguez
                Reporter:
                fdrijver Frans Drijver
              • Votes:
                2 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: