public static long extractFromDate(TimeUnitRange range, long date) {
    return extractFromDate(range, (int) date);
  }
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