luoyuxia commented on code in PR #19884:
URL: https://github.com/apache/flink/pull/19884#discussion_r911905289


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/aggregate/FirstValueWithRetractAggFunction.java:
##########
@@ -131,16 +143,27 @@ public void 
accumulate(FirstValueWithRetractAccumulator<T> acc, Object value) th
             }
             orderList.add(order);
             acc.valueToOrderMap.put(v, orderList);
-            accumulate(acc, v, order);
+            accumulate(acc, v, order, ignoreNull);
         }
     }
 
-    @SuppressWarnings("unchecked")
     public void accumulate(FirstValueWithRetractAccumulator<T> acc, Object 
value, Long order)
             throws Exception {
-        if (value != null) {
+        // default is not ignore null
+        // todo: what's the default value? default ignore null, following 
legacy code
+        accumulate(acc, value, order, true);
+    }
+
+    @SuppressWarnings("unchecked")
+    public void accumulate(
+            FirstValueWithRetractAccumulator<T> acc, Object value, Long order, 
boolean ignoreNull)

Review Comment:
   may call accumulate(acc, null, null, false);



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