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

Ineffective null check in GenericUDAFAverage#GenericUDAFAverageEvaluatorDouble#getNextResult()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 0.13.1
    • None
    • None

    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

        1. HIVE-7306.patch
          1 kB
          skrho

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: