hanyuzheng7 commented on code in PR #25897:
URL: https://github.com/apache/flink/pull/25897#discussion_r1909349391


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/TimeFunctionsITCase.java:
##########
@@ -629,8 +645,9 @@ private Stream<TestSetSpec> floorTestCases() {
                                 // 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),

Review Comment:
   Yes, as a result, we don't use `f2` and value under `f2` for TIMESTAMP_LTZ 
tests. All of them use `f3`.
   I just let all tests such as `CAST(CEIL(CAST(f3 AS TIMESTAMP_LTZ(9)) TO 
SECOND) AS STRING)` use `f3`
   ```
     .testResult(
                                   $("f3").cast(TIMESTAMP_LTZ(9))
                                           .ceil(TimeIntervalUnit.SECOND)
                                           .cast(STRING()),
                                   "CAST(CEIL(CAST(f3 AS TIMESTAMP_LTZ(9)) TO 
SECOND) AS STRING)",
                                   LocalDateTime.of(2021, 9, 24, 9, 20, 51, 0)
                                           .format(TIMESTAMP_FORMATTER),
                                   STRING().nullable())
   ```
   
   But the tests such as `CEIL(f2 TO DECADE)`
   ```
    .testResult(
                                   $("f2").ceil(TimeIntervalUnit.DECADE),
                                   "CEIL(f2 TO DECADE)",
                                   LocalDateTime.of(2030, 1, 1, 0, 0),
                                   TIMESTAMP().nullable())
   ```
   I do not change it, so we need `f2`, other tests still use it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to