@Override
  public int compare(final BigDecimal bd1, final BigDecimal bd2) {
    if (bd1 == null ^ bd2 == null) {
      return bd1 == null ? -1 : 1; // either of one is null.
    }
    if (bd1 == null) {
      return 0; // both are null
    }
    return bd1.compareTo(bd2); // natural ordering.
  }
ColumnInterpreter for doing Aggregation's with BigDecimal columns. This class is required at the
RegionServer also.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/BigDecimalColumnInterpreter.java