Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-5821

Incorrect handling of null value in Coprocessor aggregation function min()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.92.1
    • Fix Version/s: 0.92.2
    • Component/s: Coprocessors
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Both in AggregateImplementation and AggregationClient, the evaluation of the current minimum value is like:
      min = (min == null || ci.compare(result, min) < 0) ? result : min;

      The LongColumnInterpreter takes null value is treated as the least value, while the above expression takes min as the greater value when it is null. Thus, the real minimum value gets discarded if a null value comes later.
      max() could also be wrong if a different ColumnInterpreter other than LongColumnInterpreter treats null value differently (as the greatest).

        Attachments

        1. HBASE-5821.patch
          2 kB
          Wei Xue

          Activity

            People

            • Assignee:
              maryannxue Wei Xue
              Reporter:
              maryannxue Wei Xue
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: