private static long floorDiv(long x, long y) {
    long r = x / y;
    if ((x ^ y) < 0L && r * y != x) {
      --r;
    }

    return r;
  }
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