wuchong commented on a change in pull request #8937: [FLINK-13040] promote 
blink table config and add to document
URL: https://github.com/apache/flink/pull/8937#discussion_r300217135
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/api/TableConfig.scala
 ##########
 @@ -213,36 +226,29 @@ class TableConfig {
     *
     * @param minTime The minimum time interval for which idle state is 
retained. Set to 0 (zero) to
     *                never clean-up the state.
-    * @param maxTime The maximum time interval for which idle state is 
retained. May not be smaller
-    *                than than minTime. Set to 0 (zero) to never clean-up the 
state.
     */
-  def withIdleStateRetentionTime(minTime: Time, maxTime: Time): TableConfig = {
-    if (maxTime.toMilliseconds < minTime.toMilliseconds) {
-      throw new IllegalArgumentException("maxTime may not be smaller than 
minTime.")
-    }
-    this.conf.setLong(TableConfigOptions.SQL_EXEC_STATE_TTL_MS, 
minTime.toMilliseconds)
-    this.conf.setLong(TableConfigOptions.SQL_EXEC_STATE_TTL_MAX_MS, 
maxTime.toMilliseconds)
+  def withIdleStateRetentionTime(minTime: Time): TableConfig = {
+    this.conf.setString(TableConfigOptions.SQL_EXEC_STATE_TTL,
+      String.valueOf(minTime.toMilliseconds) + " ms")
 
 Review comment:
   simplify to `minTime.toString`.

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


With regards,
Apache Git Services

Reply via email to