Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-9132 CBO: Calcite Operator To Hive Operator (Calcite Return Path)
  3. HIVE-11234

CBO: Calcite Operator To Hive Operator (Calcite Return Path): reconsider the cross product in HiveJoinToMultiJoinRule

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • CBO
    • None

    Description

      Cross product in HiveJoinToMultiJoinRule needs to be reconsidered. Now the following explain query will fail at L1116 StatsRulesProcFactory : FAILED: IndexOutOfBoundsException Index: 0, Size: 0 because the key in one of the branches of the join is empty.

      explain select *  from src 
      where src.key not in (select key  from src1);
      

      If we run

      select *  from src 
      where src.key not in (select key  from src1);
      

      we will have "FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask". The root cause is the same. Other queries that will also fail include cbo_subq_not_in.q etc.

      Attachments

        1. HIVE-11234.01.patch
          2 kB
          Pengcheng Xiong

        Issue Links

          Activity

            People

              pxiong Pengcheng Xiong
              pxiong Pengcheng Xiong
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: