private void addDecimal(long value) {
              DecimalTypeInfo decimalInfo = (DecimalTypeInfo) hiveTypeInfo;
              HiveDecimal hiveDecimal = HiveDecimal.create(value, decimalInfo.scale());
              HiveDecimalWritable result = HiveDecimalUtils.enforcePrecisionScale(new HiveDecimalWritable(hiveDecimal),
                  (DecimalTypeInfo) hiveTypeInfo);
              parent.set(index, result);
            }
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