presto-main/src/main/java/io/prestosql/operator/aggregation/NumericHistogram.java/Entry/compareTo
class Entry:        @Override
        public int compareTo(Entry other)
        {
            int result = Double.compare(penalty, other.penalty);
            if (result == 0) {
                result = Integer.compare(id, other.id);
            }
            return result;
        }