wuchong commented on code in PR #19727:
URL: https://github.com/apache/flink/pull/19727#discussion_r927371145


##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/agg/AggsHandlerCodeGenerator.scala:
##########
@@ -320,6 +326,7 @@ class AggsHandlerCodeGenerator(
     initialAggregateInformation(aggInfoList)
 
     // generates all methods body first to add necessary reuse code to context
+    val setWindowSizeCode = if (isWindowSizeNeeded) genSetWindowSize() else ""

Review Comment:
   Please follow the way of `genRetract()` to generate throw exception when 
window size is not needed. 



##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/generated/AggsHandleFunction.java:
##########
@@ -36,4 +36,10 @@ public interface AggsHandleFunction extends 
AggsHandleFunctionBase {
      * @return the final result (saved in a row) of the current accumulators.
      */
     RowData getValue() throws Exception;
+
+    /**
+     * Set window size for the aggregate function. Some aggregate functions 
may requires the size of
+     * current window to do calculation.
+     */

Review Comment:
   Add more explanation about the "window size", it may confuse devs the 
relationship with tumble/hop window size.



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