public static int toInternal(java.sql.Date date) {
    long ts = date.getTime() + LOCAL_TZ.getOffset(date.getTime());
    return (int) (ts / MILLIS_PER_DAY);
  }
Converts the Java type used for UDF parameters of SQL DATE type ({@link java.sql.Date}) to
internal representation (int).

<p>Converse of {@link #toSQLDate(int)}.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/util/DateTimeUtils.java