private VectorizedRowBatch getBatchDecimalTimestamp(double[] doubleValues) {
    VectorizedRowBatch b = new VectorizedRowBatch(2);
    DecimalColumnVector dv;
    b.cols[0] = dv = new DecimalColumnVector(doubleValues.length, HiveDecimal.SYSTEM_DEFAULT_PRECISION, HiveDecimal.SYSTEM_DEFAULT_SCALE);
    b.cols[1] = new TimestampColumnVector(doubleValues.length);
    dv.noNulls = true;
    Random r = new Random(94830);
    for (int i = 0; i < doubleValues.length; i++) {
      long millis = RandomTypeUtil.randomMillis(r);
      Timestamp ts = new Timestamp(millis);
      int nanos = RandomTypeUtil.randomNanos(r);
      ts.setNanos(nanos);
      TimestampWritableV2 tsw = new TimestampWritableV2(
          org.apache.hadoop.hive.common.type.Timestamp.ofEpochMilli(ts.getTime(), ts.getNanos()));
      double asDouble = tsw.getDouble();
      doubleValues[i] = asDouble;
      HiveDecimal hiveDecimal = HiveDecimal.create(new BigDecimal(asDouble));
      dv.set(i, hiveDecimal);
    }
    b.size = doubleValues.length;
    return b;
  }
Just spot check the basic case because code path is the same as
for cast of decimal to long due to inheritance.
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorTypeCasts.java