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

Fix DISTINCT with windowing when CBO is enabled/disabled

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.1.1, 2.2.0
    • None
    • None

    Description

      For instance, the following query with CBO off:

      select distinct last_value(i) over ( partition by si order by i ),
        first_value(t)  over ( partition by si order by i )
      from over10k limit 50;
      

      will fail, with the following message:

      SELECT DISTINCT not allowed in the presence of windowing functions when CBO is off
      

      Attachments

        1. HIVE-14959.patch
          34 kB
          Jesus Camacho Rodriguez
        2. HIVE-14959.01.patch
          49 kB
          Jesus Camacho Rodriguez

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jcamachorodriguez Jesus Camacho Rodriguez Assign to me
            jcamachorodriguez Jesus Camacho Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment