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

Wrong types inferred for SemiJoin generation in CBO

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.14.0, 1.0.0, 1.2.0, 1.1.0, 1.0.1, 1.1.1, 1.3.0, 1.2.1, 2.0.0
    • Fix Version/s: 0.14.1, 1.3.0, 2.0.0, 1.0.2, 1.2.2, 1.1.2
    • Component/s: CBO
    • Labels:
      None

      Description

      The method projectNonColumnEquiConditions in HiveCalciteUtil will assign the type wrongly for newly created conditions. The problem is in this block:

            RexNode cond = rexBuilder.makeCall(SqlStdOperatorTable.EQUALS,
                rexBuilder.makeInputRef(newLeftFields.get(i).getType(), newLeftOffset + i),
                rexBuilder.makeInputRef(newLeftFields.get(i).getType(), newRightOffset + i));
      

      It looks like a code copy-paste mistake. In addition, index i is incorrect, as newLeftFields contains all the fields, not only the ones of the new condition.

        Attachments

        1. HIVE-12344.patch
          1 kB
          Jesus Camacho Rodriguez

          Activity

            People

            • Assignee:
              jcamachorodriguez Jesus Camacho Rodriguez
              Reporter:
              jcamachorodriguez Jesus Camacho Rodriguez
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: