wuchong commented on a change in pull request #11830:
URL: https://github.com/apache/flink/pull/11830#discussion_r484861838



##########
File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/aggregate/GroupAggFunction.java
##########
@@ -83,61 +85,57 @@
        // stores the accumulators
        private transient ValueState<RowData> accState = null;
 
+       private final StateTtlConfig ttlConfig;

Review comment:
       nit: We can use `long stateRetentionTime` as the member variable to save 
the serialized state. I find you already declare stateRetentionTime in other 
classes, so would be better to keep consistent.

##########
File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/aggregate/GroupAggFunction.java
##########
@@ -83,61 +85,57 @@
        // stores the accumulators
        private transient ValueState<RowData> accState = null;
 
+       private final StateTtlConfig ttlConfig;
+
        /**
         * Creates a {@link GroupAggFunction}.
         *
-        * @param minRetentionTime minimal state idle retention time.
-        * @param maxRetentionTime maximal state idle retention time.
         * @param genAggsHandler The code generated function used to handle 
aggregates.
         * @param genRecordEqualiser The code generated equaliser used to equal 
RowData.
         * @param accTypes The accumulator types.
         * @param indexOfCountStar The index of COUNT(*) in the aggregates.
         *                          -1 when the input doesn't contain COUNT(*), 
i.e. doesn't contain retraction messages.
         *                          We make sure there is a COUNT(*) if input 
stream contains retraction.
         * @param generateUpdateBefore Whether this operator will generate 
UPDATE_BEFORE messages.
+        * @param minRetentionTime minimal state idle retention time which unit 
is MILLISECONDS.
         */
        public GroupAggFunction(
-                       long minRetentionTime,
-                       long maxRetentionTime,
                        GeneratedAggsHandleFunction genAggsHandler,
                        GeneratedRecordEqualiser genRecordEqualiser,
                        LogicalType[] accTypes,
                        int indexOfCountStar,
-                       boolean generateUpdateBefore) {
-               super(minRetentionTime, maxRetentionTime);
+                       boolean generateUpdateBefore,
+                       long minRetentionTime) {

Review comment:
       nit: could you refactor the existing `minRetentionTime` to 
`stateRetentionTime`? 




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


Reply via email to