public int compareTo(Object other) {
      return Double.compare(x, ((Coord) other).x);
    }
The Coord class defines a histogram bin, which is just an (x,y) pair.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/NumericHistogram.java