snuyanzin commented on code in PR #26133:
URL: https://github.com/apache/flink/pull/26133#discussion_r1950014142


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/annotation/StateHint.java:
##########
@@ -70,4 +70,25 @@
      * or provide hints for the reflection-based extraction of the data type.
      */
     DataTypeHint type() default @DataTypeHint();
+
+    /**
+     * The time-to-live (TTL) duration that automatically cleans up the state 
entry.
+     *
+     * <p>It specifies a minimum time interval for how long idle state (i.e., 
state which was not
+     * updated by a create or write operation) will be retained. State will 
never be cleared until
+     * it was idle for less than the minimum time, and will be cleared at some 
time after it was
+     * idle.
+     *
+     * <p>Use this for being able to efficiently manage an ever-growing state 
size or for complying
+     * with data protection requirements.
+     *
+     * <p>The cleanup is based on processing time, which effectively 
corresponds to the wall clock
+     * time as defined by {@link System#currentTimeMillis()}).
+     *
+     * <p>The provided string must use Flink's duration syntax (e.g., "3 
days", "45 min", "3 hours",
+     * "60 s"). If no unit is specified, the value is interpreted as 
milliseconds. The TTL setting
+     * on a state entry has higher precedence than the global state TTL 
configuration for the entire
+     * pipeline.

Review Comment:
   would it make sense to put here a link to parser method 
`org.apache.flink.util.TimeUtils#parseDuration` which has more examples in it`s 
javadoc?



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