public static long extractFromDate(TimeUnitRange range, int date) {
    switch (range) {
      case EPOCH:
        return date * 86400L;
      default:
        return julianExtract(range, date + 2440588);
    }
  }
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