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

Order by position does not work when cbo is disabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • Query Planning
    • None

    Description

      Investigating a failed query:

      set hive.cbo.enable=false;
      set hive.orderby.position.alias=true;
      select distinct age from student order by 1 desc limit 20;
      

      The query does not sort the output correctly when cbo is disabled/inactivated. I found two issues:
      1. "order by position" query is broken by HIVE-16774
      2. In particular, select distinct query never work for "order by position" query

      Attachments

        1. HIVE-18189.3.patch
          23 kB
          Daniel Dai
        2. HIVE-18189.2.patch
          22 kB
          Daniel Dai
        3. HIVE-18189.1.patch
          13 kB
          Daniel Dai

        Activity

          People

            daijy Daniel Dai
            daijy Daniel Dai
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: