JingsongLi commented on code in PR #594:
URL: https://github.com/apache/flink-table-store/pull/594#discussion_r1134786122


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/mergetree/compact/aggregate/AggregateMergeFunction.java:
##########
@@ -172,10 +133,30 @@ public MergeFunction<KeyValue> create(@Nullable int[][] 
projection) {
                 fieldTypes = project.project(tableTypes);
             }
 
-            return new AggregateMergeFunction(
-                    createFieldGetters(fieldTypes),
-                    new AggregateMergeFunction.RowAggregator(
-                            conf, fieldNames, fieldTypes, primaryKeys));
+            FieldAggregator[] fieldAggregators = new 
FieldAggregator[fieldNames.size()];
+            for (int i = 0; i < fieldNames.size(); i++) {
+                String fieldName = fieldNames.get(i);
+                DataType fieldType = fieldTypes.get(i);
+                // aggregate by primary keys, so they do not aggregate
+                boolean isPrimaryKey = primaryKeys.contains(fieldName);
+                String strAggFunc =
+                        conf.get(
+                                key(FIELDS + "." + fieldName + "." + 
AGG_FUNCTION)
+                                        .stringType()
+                                        .noDefaultValue()
+                                        .withDescription(
+                                                "Get " + fieldName + "'s 
aggregate function"));
+                boolean ignoreRetract =
+                        conf.get(
+                                key(FIELDS + "." + fieldName + "." + 
IGNORE_RETRACT)
+                                        .booleanType()
+                                        .defaultValue(false));

Review Comment:
   I delete description of `AGG_FUNCTION`, here the description is useless, it 
can not be see by users.



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