private static long internalParseTimestampMillis(String dateStr, String format, TimeZone tz) {
    SimpleDateFormat formatter = FORMATTER_CACHE.get(format);
    formatter.setTimeZone(tz);
    try {
      Date date = formatter.parse(dateStr);
      return date.getTime();
    } catch (ParseException e) {
      LOG.error(
          String.format(
              "Exception when parsing datetime string '%s' in format '%s'", dateStr, format),
          e);
      return Long.MIN_VALUE;
    }
  }
Helper for CAST({date} AS VARCHAR(n)).
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/util/DateTimeUtils.java