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

variable typo in HiveOpConverter (714) and SemanticAnalyzer (7496)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Pending Closed
    • None
    • 1.3.0
    • Query Planning
    • None

    Description

      HiveOpConverter lines 703-717

            int kindex = exprBack == null ? -1 : ExprNodeDescUtils.indexOf(exprBack, reduceKeysBack);
            if (kindex >= 0) {
              ColumnInfo newColInfo = new ColumnInfo(colInfo);
              newColInfo.setInternalName(Utilities.ReduceField.KEY + ".reducesinkkey" + kindex);
              newColInfo.setAlias(outputColName);
              newColInfo.setTabAlias(colInfo.getTabAlias());
              outputColumns.add(newColInfo);
              index[i] = kindex;
              continue;
            }
            int vindex = exprBack == null ? -1 : ExprNodeDescUtils.indexOf(exprBack, reduceValuesBack);
            if (kindex >= 0) { // looks like it should be vindex instead of kindex
              index[i] = -vindex - 1;
              continue;
            }
      

      Most probably the second "if (kindex >= 0)" (line 714) should be replaces with "if (vindex >= 0)"

      The same situation in SemanticAnalyzer (7483-7499)

            int kindex = exprBack == null ? -1 : ExprNodeDescUtils.indexOf(exprBack, reduceKeysBack);
            if (kindex >= 0) {
              ColumnInfo newColInfo = new ColumnInfo(colInfo);
              newColInfo.setInternalName(Utilities.ReduceField.KEY + ".reducesinkkey" + kindex);
              newColInfo.setTabAlias(nm[0]);
              outputRR.put(nm[0], nm[1], newColInfo);
              if (nm2 != null) {
                outputRR.addMappingOnly(nm2[0], nm2[1], newColInfo);
              }
              index[i] = kindex;
              continue;
            }
            int vindex = exprBack == null ? -1 : ExprNodeDescUtils.indexOf(exprBack, reduceValuesBack);
            if (kindex >= 0) { // looks like it should be vindex instead of kindex
              index[i] = -vindex - 1;
              continue;
            }
      

      Attachments

        1. HIVE-10582.1.patch
          2 kB
          Alexander Pivovarov
        2. rb33790.patch
          2 kB
          Alexander Pivovarov

        Issue Links

          Activity

            People

              apivovarov Alexander Pivovarov
              apivovarov Alexander Pivovarov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: