[ 
https://issues.apache.org/jira/browse/FLINK-6242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15973846#comment-15973846
 ] 

ASF GitHub Bot commented on FLINK-6242:
---------------------------------------

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.


> codeGen DataSet Goupingwindow Aggregates
> ----------------------------------------
>
>                 Key: FLINK-6242
>                 URL: https://issues.apache.org/jira/browse/FLINK-6242
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>            Reporter: Shaoxuan Wang
>            Assignee: Shaoxuan Wang
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to