public static int compare(HiveDecimalWritable writableLeft, HiveDecimal right) {
    return writableLeft.compareTo(right);
  }
Utility functions for vector operations on decimal values.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/DecimalUtil.java