Hive
  1. Hive
  2. HIVE-7306

Ineffective null check in GenericUDAFAverage#GenericUDAFAverageEvaluatorDouble#getNextResult()

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 0.13.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

                  Object[] o = ss.intermediateVals.remove(0);
                  Double d = o == null ? 0.0 : (Double) o[0];
                  r = r == null ? null : r - d;
                  cnt = cnt - ((Long) o[1]);
      

      Array o is accessed without null check in the last line above.

        Issue Links

          Activity

            People

            • Assignee:
              skrho
              Reporter:
              Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development