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

When we merge two MapJoin MapRedTasks, the TableScanOperator of the second one should be removed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.12.0
    • Component/s: Query Processor
    • Labels:
      None

      Description

      set hive.auto.convert.join=true;
      set hive.auto.convert.join.noconditionaltask=true;
      EXPLAIN
      SELECT x1.key AS key FROM src x1 JOIN src1 y1 ON (x1.key = y1.key) JOIN src1 y2 ON (x1.value = y2.value) GROUP BY x1.key;
      

      We will get a NPE from MetadataOnlyOptimizer. The reason is that the operator tree of the MapRedTask evaluating two MapJoins is

      TS1->MapJoin1->TS2->MapJoin2->...
      

      We should remove the TS2...

        Attachments

        1. HIVE-4927.D11811.1.patch
          17 kB
          Phabricator
        2. HIVE-4927.D11811.2.patch
          186 kB
          Phabricator
        3. HIVE-4927.D11811.3.patch
          74 kB
          Yin Huai
        4. HIVE-4927.D11811.3.patch
          74 kB
          Phabricator

          Issue Links

            Activity

              People

              • Assignee:
                yhuai Yin Huai
                Reporter:
                yhuai Yin Huai
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: