Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-9002 union all does not generate correct result for order by and limit
  3. HIVE-9009

order by (limit) meaning for the last subquery of union in Hive is different from other main stream RDBMS

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to IssueMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • None
    • None

    Description

      Currently Hive will treat
      select id from A
      union all
      select id from B
      order by id
      as
      select id from A
      union all
      (select id from B
      order by id)

      However, it should be treated as

      (select id from A
      union all
      select id from B)
      order by id

      Attachments

        1. HIVE-9009.01.patch
          976 kB
          Pengcheng Xiong
        2. HIVE-9002-WIP.patch
          478 kB
          Pengcheng Xiong

        Issue Links

        Activity

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

          People

            pxiong Pengcheng Xiong Assign to me
            pxiong Pengcheng Xiong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment