wangpeibin713 commented on a change in pull request #14863:
URL: https://github.com/apache/flink/pull/14863#discussion_r580351246



##########
File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/deduplicate/ProcTimeDeduplicateKeepLastRowFunction.java
##########
@@ -33,26 +36,49 @@
     private final boolean generateUpdateBefore;
     private final boolean generateInsert;
     private final boolean inputIsInsertOnly;
+    private final boolean isStateTtlEnabled;
+    /** The code generated equaliser used to equal RowData. */
+    private final GeneratedRecordEqualiser genRecordEqualiser;
+
+    /** The record equaliser used to equal RowData. */
+    private transient RecordEqualiser equaliser;
 
     public ProcTimeDeduplicateKeepLastRowFunction(
             InternalTypeInfo<RowData> typeInfo,
             long stateRetentionTime,
             boolean generateUpdateBefore,
             boolean generateInsert,
-            boolean inputInsertOnly) {
+            boolean inputInsertOnly,
+            GeneratedRecordEqualiser genRecordEqualiser) {
         super(typeInfo, null, stateRetentionTime);
         this.generateUpdateBefore = generateUpdateBefore;
         this.generateInsert = generateInsert;
         this.inputIsInsertOnly = inputInsertOnly;
+        this.genRecordEqualiser = genRecordEqualiser;
+        this.isStateTtlEnabled = stateRetentionTime > 0;

Review comment:
       In order to minimum change the code . I think it's better not to put 
`isStateTtlEnabled ` into `DeduplicateFunctionBase` in this issue.
   Maybe it would be better to add a function like `protected boolean 
isStateTtlEnabled()`,  I‘m pleased to do it in another issue. 😊😊




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


Reply via email to