@Test
  public void testCastDecimalToTimestamp() throws HiveException {
    double[] doubleValues = new double[500];
    VectorizedRowBatch b = getBatchDecimalTimestamp(doubleValues);
    VectorExpression expr = new CastDecimalToTimestamp(0, 1);
    expr.evaluate(b);
    TimestampColumnVector r = (TimestampColumnVector) b.cols[1];
    for (int i = 0; i < doubleValues.length; i++) {
      Timestamp timestamp = r.asScratchTimestamp(i);
      double asDouble = TimestampUtils.getDouble(timestamp);
      double expectedDouble = doubleValues[i];
      if (expectedDouble != asDouble) {
        assertTrue(false);
      }
    }
  }
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