protected long getTimestampField(TimestampColumnVector timestampColVector, int elementNum) {
    calendar.setTime(timestampColVector.asScratchTimestamp(elementNum));
    return calendar.get(field);
  }
Abstract class to return various fields from a Timestamp.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFTimestampFieldTimestamp.java