private void checkForInvalidIsoWeek(int iyyy, int iw) {
    if (iyyy == 0) {
      return;
    }

    LocalDateTime ldt = LocalDateTime.ofInstant(Instant.EPOCH, ZoneOffset.UTC);
    try {
      ldt = ldt.with(IsoFields.WEEK_BASED_YEAR, iyyy);
      ldt = ldt.with(IsoFields.WEEK_OF_WEEK_BASED_YEAR, iw);
    } catch (DateTimeException e) {
      throw new IllegalArgumentException(e);
    }

    if (ldt.getYear() != iyyy) {
      throw new IllegalArgumentException("ISO year " + iyyy + " does not have " + iw + " weeks.");
    }
  }
Check for WEEK_OF_WEEK_BASED_YEAR (iw) value 53 when WEEK_BASED_YEAR (iyyy) does not have 53
weeks.
common/src/java/org/apache/hadoop/hive/common/format/datetime/HiveSqlDateTimeFormatter.java