class IcebergDecimalObjectInspector extends AbstractPrimitiveJavaObjectInspector implements HiveDecimalObjectInspector {

  public static IcebergDecimalObjectInspector get(int precision, int scale) {
    Preconditions.checkArgument(scale < precision);
    Preconditions.checkArgument(precision <= HiveDecimal.MAX_PRECISION);
    Preconditions.checkArgument(scale <= HiveDecimal.MAX_SCALE);

    Integer key = precision << 8 | scale;
    return CACHE.get(key, k -> new IcebergDecimalObjectInspector(precision, scale));
  }

  private  IcebergDecimalObjectInspector(int precision, int scale);

}