@Override
  protected void func(DecimalColumnVector outV, TimestampColumnVector inV, int i) {
    Double timestampDouble = TimestampUtils.getDouble(inV.asScratchTimestamp(i));
    HiveDecimal result = HiveDecimal.create(timestampDouble.toString());
    outV.set(i, HiveDecimal.create(timestampDouble.toString()));
  }
To be used to cast timestamp to decimal.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastTimestampToDecimal.java