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

Rewrite correlated EXISTS/IN subqueries into LEFT SEMI JOIN

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: Query Planning
    • Labels:
      None

      Description

      Currently such queries are written into group by + inner join with value generator and is inefficient. Value generator consists of join with outer query to fetch all correlated values. This value generator could be completely eliminated if such queries are instead rewritten into LEFT SEMI JOIN.
      Note that to do this first hive need to support LEFT SEMI JOIN with non-equi condition (HIVE-17766).

        Attachments

        1. HIVE-17767.1.patch
          591 kB
          Vineet Garg
        2. HIVE-17767.2.patch
          1.18 MB
          Vineet Garg
        3. HIVE-17767.3.patch
          1.18 MB
          Vineet Garg
        4. HIVE-17767.4.patch
          1.11 MB
          Vineet Garg
        5. HIVE-17767.5.patch
          1.25 MB
          Vineet Garg
        6. HIVE-17767.6.patch
          1.26 MB
          Vineet Garg
        7. HIVE-17767.7.patch
          1.26 MB
          Vineet Garg

          Issue Links

            Activity

              People

              • Assignee:
                vgarg Vineet Garg
                Reporter:
                vgarg Vineet Garg
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: