hanyuzheng7 commented on code in PR #25759: URL: https://github.com/apache/flink/pull/25759#discussion_r1884054237
########## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/TimeFunctionsITCase.java: ########## @@ -439,8 +441,9 @@ private Stream<TestSetSpec> ceilTestCases() { // Fractional seconds are lost LocalTime.of(11, 22, 33), LocalDate.of(1990, 10, 14), - LocalDateTime.of(2020, 2, 29, 1, 56, 59, 987654321)) - .andDataTypes(TIME(), DATE(), TIMESTAMP()) + LocalDateTime.of(2020, 2, 29, 1, 56, 59, 987654321), + LocalDateTime.of(2020, 2, 29, 1, 56, 57, 924325471)) Review Comment: The reason is if I use `LocalDateTime.of(2020, 2, 29, 1, 56, 59, 987654321)`, after ceil, it will become 2022, 2, 2, 1, 57, ceil second answer is same as ceil minute, so to avoid tricky, I generate a new localdatatimes. I think generate an new localdatatime is not so tricky, because we use f3 to stand for it, and old one use f2, so another contributor can know that. And also lots of time as smiliar test case such as https://github.com/apache/flink/blob/master/flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/TimeFunctionsITCase.java#L64-L65, so, i think it is ok to keep 2 locationtimes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org