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

auto convert map join may miss good candidates

    Details

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

      Description

      In case in a join, there is a subquery which does a simple select, the auto convert map join may miss a good candidate at run time. The plan generated is correct, but the selection at runtime has a bug.

      For example:
      set hive.smalltable.filesize=1000;
      create table src_one as select * from src where key=100;
      select count(1)
      from
      (
      select * from src
      ) subq
      join
      src_small on src.key = subq.key;

      The table src_small can be a small table. This is in the plan, but at runtime it gets filtered out.

      1. HIVE-2120.1.patch
        0.8 kB
        He Yongqiang

        Activity

        Hide
        he yongqiang He Yongqiang added a comment -

        No tests added, because the plan generation is correct, and the final output is also correct now.

        The main difference is the execution path at runtime.

        Show
        he yongqiang He Yongqiang added a comment - No tests added, because the plan generation is correct, and the final output is also correct now. The main difference is the execution path at runtime.
        Hide
        namit Namit Jain added a comment -

        +1

        Show
        namit Namit Jain added a comment - +1
        Hide
        namit Namit Jain added a comment -

        Committed. Thanks Yongqiang

        Show
        namit Namit Jain added a comment - Committed. Thanks Yongqiang

          People

          • Assignee:
            he yongqiang He Yongqiang
            Reporter:
            he yongqiang He Yongqiang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development