featzhang commented on code in PR #27845:
URL: https://github.com/apache/flink/pull/27845#discussion_r3008354306


##########
flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/materializedtable/MaterializedTableManagerTest.java:
##########
@@ -136,66 +136,66 @@ static Stream<TestSpec> testData() {
                 // The interval of freshness match the partition specified by 
the 'date-formatter'.
                 TestSpec.create()
                         .schedulerTime("2024-01-01 00:00:00")
-                        .freshness(IntervalFreshness.ofDay("1"))
+                        .freshness(IntervalFreshness.ofDay(1))

Review Comment:
   Recommend adding boundary combination tests for Interval and START MODE.



##########
flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/materializedtable/MaterializedTableManagerTest.java:
##########
@@ -136,66 +136,66 @@ static Stream<TestSpec> testData() {
                 // The interval of freshness match the partition specified by 
the 'date-formatter'.
                 TestSpec.create()
                         .schedulerTime("2024-01-01 00:00:00")
-                        .freshness(IntervalFreshness.ofDay("1"))
+                        .freshness(IntervalFreshness.ofDay(1))

Review Comment:
   String parameters may cause runtime parsing errors; recommend unifying to 
integer parameters.



##########
flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/materializedtable/MaterializedTableManagerTest.java:
##########
@@ -136,66 +136,66 @@ static Stream<TestSpec> testData() {
                 // The interval of freshness match the partition specified by 
the 'date-formatter'.
                 TestSpec.create()
                         .schedulerTime("2024-01-01 00:00:00")
-                        .freshness(IntervalFreshness.ofDay("1"))
+                        .freshness(IntervalFreshness.ofDay(1))

Review Comment:
   Repeated test logic can be extracted into factory methods or generated loops 
to reduce maintenance.



##########
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/api/internal/ShowCreateUtilTest.java:
##########
@@ -313,7 +313,7 @@ private static Collection<Arguments> 
argsForShowCreateMaterializedTable() {
                                 null,
                                 List.of(),
                                 null,
-                                IntervalFreshness.ofMinute("1"),
+                                IntervalFreshness.ofMinute(1),

Review Comment:
   Annotate Interval unit (day/hour/minute) in test comments for clarity.



-- 
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