snuyanzin commented on code in PR #25759: URL: https://github.com/apache/flink/pull/25759#discussion_r1883850765
########## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/TimeFunctionsITCase.java: ########## @@ -580,7 +583,36 @@ private Stream<TestSetSpec> ceilTestCases() { $("f2").ceil(TimeIntervalUnit.MILLENNIUM), "CEIL(f2 TO MILLENNIUM)", LocalDateTime.of(3001, 1, 1, 0, 0), - TIMESTAMP().nullable())); + TIMESTAMP().nullable()) + .testResult( + $("f2").cast(TIMESTAMP_LTZ(3)) + .ceil(TimeIntervalUnit.HOUR) + .cast(STRING()), + "CAST(CEIL(CAST(f3 AS TIMESTAMP_LTZ(3)) TO HOUR) AS STRING)", + formatAsTimestamp(LocalDateTime.of(2020, 2, 29, 2, 0, 0, 0)), + STRING().nullable()) + .testResult( + $("f2").cast(TIMESTAMP_LTZ(3)) + .ceil(TimeIntervalUnit.MINUTE) + .cast(STRING()), + "CAST(CEIL(CAST(f2 AS TIMESTAMP_LTZ(3)) TO MINUTE) AS STRING)", + formatAsTimestamp(LocalDateTime.of(2020, 2, 29, 1, 57, 0, 0)), + STRING().nullable()) + .testResult( + $("f3").cast(TIMESTAMP_LTZ(3)) + .ceil(TimeIntervalUnit.SECOND) + .cast(STRING()), + "CAST(CEIL(CAST(f3 AS TIMESTAMP_LTZ(3)) TO SECOND) AS STRING)", + formatAsTimestamp(LocalDateTime.of(2020, 2, 29, 1, 56, 58, 0)), Review Comment: why here 58 seconds? we are making ceil, it should go up or did I miss anything? -- 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