@Override
  public int precision() {
    if (value == null) {
      return super.precision();
    }
    return BigDecimal.valueOf(value.get()).precision();
  }
A WritableConstantLongObjectInspector is a WritableLongObjectInspector
that implements ConstantObjectInspector.
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableConstantLongObjectInspector.java