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

Enhance HiveSemiJoin rule to convert join + group by on left side to Left Semi Join

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • None
    • None

    Description

      Currently HiveSemiJoin rule looks for pattern where group by is on right side.

      We can convert joins which have group by on left side (assuming group by keys are same as join keys and none of the columns are being projected from left side) to LEFT SEMI JOIN by swapping the inputs. e.g. queries such as:

      explain select pp.p_partkey from (select distinct p_name from part) p join part pp on pp.p_name = p.p_name;
      

      Attachments

        1. HIVE-20826.1.patch
          10 kB
          Vineet Garg
        2. HIVE-20826.2.patch
          250 kB
          Vineet Garg
        3. HIVE-20826.3.patch
          250 kB
          Vineet Garg
        4. HIVE-20826.4.patch
          325 kB
          Vineet Garg

        Issue Links

          Activity

            People

              vgarg Vineet Garg
              vgarg Vineet Garg
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: