swuferhong commented on code in PR #22978:
URL: https://github.com/apache/flink/pull/22978#discussion_r1265088226


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/WrapJsonAggFunctionArgumentsRule.java:
##########
@@ -145,13 +161,13 @@ private void addProjections(
      * Returns a {@link TargetMapping} that defines how the arguments of the 
aggregation must be
      * mapped such that the wrapped arguments are used instead.
      */
-    private TargetMapping getAggArgsMapping(int inputCount, List<Integer> 
affectedArgs) {
-        final int newCount = inputCount + affectedArgs.size();
+    private TargetMapping getAggArgsMapping(int inputCount, int 
affectedArgsSize, int affectedArg) {
+        final int newCount = inputCount + affectedArgsSize;
 
         final TargetMapping argsMapping =
                 Mappings.create(MappingType.BIJECTION, newCount, newCount);
-        for (int i = 0; i < affectedArgs.size(); i++) {
-            argsMapping.set(affectedArgs.get(i), inputCount + i);
+        for (int i = 0; i < affectedArgsSize; i++) {

Review Comment:
   > do we still need the for loop after changing to the single value 
`affectedArg`?
   
   Done!



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to