You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/11/01 04:03:41 UTC

[GitHub] [flink] wenlong88 commented on a change in pull request #17509: [FLINK-24501][table-runtime] Stores window progress into state in order to check whether an input element is late or not for window-tvf aggregate operator.

wenlong88 commented on a change in pull request #17509:
URL: https://github.com/apache/flink/pull/17509#discussion_r739943059



##########
File path: flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/window/slicing/SlicingWindowOperator.java
##########
@@ -170,6 +180,24 @@ public void open() throws Exception {
                         });
     }
 
+    @Override
+    public void initializeState(StateInitializationContext context) throws Exception {
+        super.initializeState(context);
+        ListStateDescriptor<Long> watermarkStateDesc =
+                new ListStateDescriptor<>("watermark", LongSerializer.INSTANCE);
+        this.watermarkState = context.getOperatorStateStore().getListState(watermarkStateDesc);
+        if (context.isRestored()) {
+            this.currentWatermark = this.watermarkState.get().iterator().next();

Review comment:
       use the min watermark as the initial watermark?




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org