private void checkForLeftoverInput(String fullInput, int index) {
    if (!fullInput.substring(index).isEmpty()) {
      throw new IllegalArgumentException("Leftover input after parsing: " +
          fullInput.substring(index) + " in string " + fullInput);
    }
  }
Anything left unparsed at end of input string? Throw error.
@param fullInput full input String
@param index where we left off parsing
common/src/java/org/apache/hadoop/hive/common/format/datetime/HiveSqlDateTimeFormatter.java