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

first_value can't have more than one order by column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.11.0
    • 2.1.0
    • SQL

    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.patch
          57 kB
          jcamachorodriguez
        2. HIVE-4662.01.patch
          57 kB
          jcamachorodriguez
        3. HIVE-4662.01.patch
          60 kB
          jcamachorodriguez
        4. HIVE-4662.01.patch
          60 kB
          jcamachorodriguez

        Issue Links

          Activity

            People

              jcamacho Jesús Camacho Rodríguez
              fdrijver Frans Drijver
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: