protected byte[] convertToBytes(Binary binary) {
      DecimalLogicalTypeAnnotation logicalType = (DecimalLogicalTypeAnnotation) type.getLogicalTypeAnnotation();
      return HiveDecimalUtils.enforcePrecisionScale(new HiveDecimalWritable(binary.getBytes(), logicalType.getScale()),
                      new DecimalTypeInfo(logicalType.getPrecision(), logicalType.getScale())).toString().getBytes();
    }
ETypeConverter is an easy way to set the converter for the right type.
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/convert/ETypeConverter.java