public String getPattern() {
    return pattern;
  }
Does the temporalUnit/temporalField of the next token match the pattern's?
common/src/java/org/apache/hadoop/hive/common/format/datetime/HiveSqlDateTimeFormatter.java