wuchong commented on a change in pull request #13392: URL: https://github.com/apache/flink/pull/13392#discussion_r490813992
########## 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: What about refactoring the `earlyFireDelay` to `Duration` type? Then we can simplify the above code to ```suggestion val earlyFireDelay: Duration = tableConfig.getConfiguration .getOptional(TABLE_EXEC_EMIT_EARLY_FIRE_DELAY) .orElse(null) ``` I think `Duration` is more concise than `Long`. ---------------------------------------------------------------- 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: us...@infra.apache.org