@Override
  protected long getField(byte[] bytes, int start, int length) throws ParseException {
    try {
      String decoded = Text.decode(bytes, start, length);
      Date date = DateParser.parseDate(decoded);
      if (date == null) {
        throw new ParseException("Unable to parse date string", 0);
      }
      return date.getDayOfWeek();
    } catch (CharacterCodingException e) {
      throw new ParseException(e.getMessage(), 0);
    }
  }
Expression to get day of week.
Extends {@link VectorUDFTimestampFieldString}
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekString.java