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

Ineffective null check in GenericUDAFAverage#GenericUDAFAverageEvaluatorDouble#getNextResult()

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rsk13th skrho
                Reporter:
                yuzhihong@gmail.com Ted Yu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: