hequn8128 opened a new pull request #7209: [FLINK-10977][table] Add UnBounded 
FlatAggregate operator to streaming Table API
URL: https://github.com/apache/flink/pull/7209
 
 
   
   
   ## What is the purpose of the change
   
   This pull request adds UnBounded FlatAggregate operator to streaming Table 
API.
   The design doc can be found 
[here](https://docs.google.com/document/d/1tnpxg31EQz2-MEzSotwFzqatsB4rNLz0I-l_vPa5H4Q/edit#heading=h.q23rny2iglsr).
   Some discussion about flatAggregate can be found 
[here](http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/DISCUSS-Table-API-Enhancement-Outline-td25070.html).
   
   
   ## Brief change log
   
     - Add flatAggregate api to Table. In order to close the "flatAggregate" 
with a select statement, add a FlatAggTable and a GroupedFlatAggTable class.
     - Add TableAggregateFunction for User-Defined Table Aggregates. User can 
register a TableAggregateFunction through table environment.
     - Add logical relnodes for TableAggregate: `LogicalTableAggregate`, 
`FlinkLogicalTableAggregate`, `DataStreamTableAggregate`.
     - Add Rules for TableAggregate relnodes.
     - Refactor codegen logic for Aggregations. Add a 
`TableAggregationCodeGenerator` code generator to generate the TableAggregate 
runtime function.
     - Add documents and tests.
     - Add a enforceKeyFields() method in `UpsertStreamTableSink` in order to 
upsert output results of flatAggregate, i.e, `UpsertStreamTableSink` requires 
keys when upsert data. The enforceKeyFields() return empty array by default. 
Users can override the method if the data contain logical key fields. However, 
I find that java subclasses still have to implement the scala default method. 
In order to solve the scala problem, I migrated the scala sink 
interfaces(`AppendStreamTableSink`, `RetractStreamTableSink`, 
`UpsertStreamTableSink` etc) to java, thus the java subclasses do not have to 
inherit the default methods.
   
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
     - Added integration tests, plan tests, validation tests for 
TableAggregate. 
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (docs)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to