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

    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-9002-WIP.patch
          478 kB
          Pengcheng Xiong
        2. HIVE-9009.01.patch
          976 kB
          Pengcheng Xiong

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: