wangxlong commented on a change in pull request #13392:
URL: https://github.com/apache/flink/pull/13392#discussion_r491683758



##########
File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/utils/WindowEmitStrategy.scala
##########
@@ -153,12 +152,22 @@ object WindowEmitStrategy {
     }
     val enableEarlyFireDelay = tableConfig.getConfiguration.getBoolean(
       TABLE_EXEC_EMIT_EARLY_FIRE_ENABLED)
-    val earlyFireDelay = getMillisecondFromConfigDuration(
-      tableConfig, TABLE_EXEC_EMIT_EARLY_FIRE_DELAY)
+    val earlyFireDelay: JLong = if (tableConfig.getConfiguration
+      .getOptional(TABLE_EXEC_EMIT_EARLY_FIRE_DELAY).isPresent) {
+      tableConfig.getConfiguration
+        .get(TABLE_EXEC_EMIT_EARLY_FIRE_DELAY).toMillis
+    } else {
+      null
+    }

Review comment:
       Yes, Duration type for earlyFireDelay and lateFireDelay will be more 
reasonable.
   I have updated, thanks for reviewing again.

##########
File path: 
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/MiniBatchIntervalInferTest.scala
##########
@@ -426,15 +428,20 @@ class MiniBatchIntervalInferTest extends TableTestBase {
 
   private def withEarlyFireDelay(tableConfig: TableConfig, interval: Time): 
Unit = {
     val intervalInMillis = interval.toMilliseconds
-    val preEarlyFireInterval = 
TableConfigUtils.getMillisecondFromConfigDuration(
-      tableConfig, TABLE_EXEC_EMIT_EARLY_FIRE_DELAY)
+    val preEarlyFireInterval = if (tableConfig.getConfiguration
+      .getOptional(TABLE_EXEC_EMIT_EARLY_FIRE_DELAY).isPresent) {
+      tableConfig.getConfiguration
+        .get(TABLE_EXEC_EMIT_EARLY_FIRE_DELAY).toMillis
+    } else {
+      null
+    }

Review comment:
       Updated.

##########
File path: 
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/WindowAggregateITCase.scala
##########
@@ -349,15 +349,20 @@ class WindowAggregateITCase(mode: StateBackendMode)
 
   private def withLateFireDelay(tableConfig: TableConfig, interval: Time): 
Unit = {
     val intervalInMillis = interval.toMilliseconds
-    val preLateFireInterval = getMillisecondFromConfigDuration(tableConfig,
-      TABLE_EXEC_EMIT_LATE_FIRE_DELAY)
+    val preLateFireInterval = if (tableConfig.getConfiguration
+      .getOptional(TABLE_EXEC_EMIT_LATE_FIRE_DELAY).isPresent) {
+      tableConfig.getConfiguration.get(
+        TABLE_EXEC_EMIT_LATE_FIRE_DELAY).toMillis
+    } else {
+      null
+    }

Review comment:
       Updated.




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

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


Reply via email to