public HiveDecimal readDecimal(int scale, int byteNum) throws IOException {
    byte[] decimalContent = new byte[byteNum];
    int numOfBytesRead = in.read(decimalContent);
    if (decimalContent.length != 0 && numOfBytesRead != byteNum) {
      throw new EOFException(
          format("Fail to read the decimal. Expect %d bytes, get %d bytes", byteNum, numOfBytesRead));
    }
    ArrayUtils.reverse(decimalContent);
    return HiveDecimal.create(new BigInteger(decimalContent), scale);
  }
Read DECIMAL(P, S).
The representation of decimal in Teradata binary format is
the byte number to read is decided solely by the precision(P),
HiveDecimal is constructed through the byte array and scale.
the null DECIMAL will use 0x00 to pad.

@param scale the scale
@param byteNum the byte num
@return the hive decimal
@throws IOException the io exception
serde/src/java/org/apache/hadoop/hive/serde2/teradata/TeradataBinaryDataInputStream.java