private static LocalDateTime fromTemporalAccessor(TemporalAccessor accessor, int precision) {
    // complement year with 1970
    int year = accessor.isSupported(YEAR) ? accessor.get(YEAR) : 1970;
    // complement month with 1
    int month = accessor.isSupported(MONTH_OF_YEAR) ? accessor.get(MONTH_OF_YEAR) : 1;
    // complement day with 1
    int day = accessor.isSupported(DAY_OF_MONTH) ? accessor.get(DAY_OF_MONTH) : 1;
    // complement hour with 0
    int hour = accessor.isSupported(HOUR_OF_DAY) ? accessor.get(HOUR_OF_DAY) : 0;
    // complement minute with 0
    int minute = accessor.isSupported(MINUTE_OF_HOUR) ? accessor.get(MINUTE_OF_HOUR) : 0;
    // complement second with 0
    int second = accessor.isSupported(SECOND_OF_MINUTE) ? accessor.get(SECOND_OF_MINUTE) : 0;
    // complement nano_of_second with 0
    int nanoOfSecond = accessor.isSupported(NANO_OF_SECOND) ? accessor.get(NANO_OF_SECOND) : 0;

    if (precision == 0) {
      nanoOfSecond = 0;
    } else if (precision != 9) {
      nanoOfSecond = (int) floor(nanoOfSecond, powerX(10, 9 - precision));
    }

    return LocalDateTime.of(year, month, day, hour, minute, second, nanoOfSecond);
  }
This is similar to {@link LocalDateTime#from(TemporalAccessor)}, but it's less strict and
introduces default values.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/util/DateTimeUtils.java