Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4348#discussion_r127677326
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/GroupAggProcessFunction.scala
 ---
    @@ -131,7 +131,8 @@ class GroupAggProcessFunction(
     
           // if this was not the first row and we have to emit retractions
           if (generateRetraction && !firstRow) {
    -        if (prevRow.row.equals(newRow.row)) {
    +        // the condition of !stateCleaningEnabled is avoided state to be 
cleaned up too early
    --- End diff --
    
    I would move the description into the `if` block and modify it as follows:
    ```
    // newRow is the same as before and state cleaning is not enabled. We do 
not emit retraction and acc message.
    // If state cleaning is enabled, we have to emit messages to prevent too 
early state eviction of downstream operators.
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to