Github user shaoxuan-wang commented on the issue:

    https://github.com/apache/flink/pull/3735
  
    @fhueske  thanks for your feedback.
    Yes, we could keep GeneratedAggregations interface very clean as 
    ```
    abstract class GeneratedAggregations extends Function {
     def setAggregationResults(accumulators: Row, output: Row)
     def setForwardedFields(input: Row, output: Row)
     def accumulate(accumulators: Row, input: Row)
     def retract(accumulators: Row, input: Row)
     def createAccumulators(): Row
     def mergeAccumulatorsPair(a: Row, b: Row): Row
     def resetAccumulator(accumulators: Row)
    }
    ```
    But I feel it might be not very good to add more parameters into code 
generate function as caller function will usually have to construct unnecessary 
empty parameters. I think we can break code generate functions into 2-3 
functions (these are just the interface to process code-gen parameters, the 
fundamental implementation of each function will be shared). Let me prototype 
the changes, and we can continue the discussions from there.
    
    Regarding to your other comments. I did not look into the logic of previous 
implementations while just focused on the code-gen. I will take a look and 
optimize them.


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