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

Order by/Sort by in subquery

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.0.0
    • None

    Description

      select * from (select * from foo order by c asc) bar order by c desc;

      in hive sorts the data set twice. The optimizer should probably remove any order by/sort by in the sub query unless you use 'limit '. Could even go so far as barring it at the semantic level.

      Attachments

        1. HIVE-6348.1.patch
          3 kB
          Rui Li
        2. HIVE-6348.2.patch
          3 kB
          Rui Li
        3. HIVE-6348.3.patch
          4 kB
          Rui Li
        4. HIVE-6348.4.patch
          508 kB
          Rui Li

        Issue Links

          Activity

            People

              lirui Rui Li
              hagleitn Gunther Hagleitner
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: