@Override
  protected long getField(byte[] bytes, int start, int length) throws ParseException {
    Date date = null;
    try {
      String decoded = Text.decode(bytes, start, length);
      date = format.parse(decoded);
    } catch (CharacterCodingException e) {
      throw new ParseException(e.getMessage(), 0);
    }
    calendar.setTime(date);
    return calendar.get(Calendar.WEEK_OF_YEAR);
  }
Expression to get week of year.
Extends {@link VectorUDFTimestampFieldString}
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFWeekOfYearString.java