hequn8128 opened a new pull request #8818: [FLINK-12794][table] Support ACC 
mode for non-window streaming FlatAggregate on Table API
URL: https://github.com/apache/flink/pull/8818
 
 
   ## What is the purpose of the change
   
   [FLINK-12401](https://issues.apache.org/jira/browse/FLINK-12401) has 
addressed incremental emit under AccRetract mode. This pull request supports 
incremental emit under Acc mode. The detail can be found in 
[Flip-29](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=97552739)
   
   
   ## Brief change log
   
     - API part. Add withKeys method to table api. Similar to the `as` which is 
used to descript the result table schema, the `withKeys` function is used to 
specify the key fields of the result table of the TableAggregateFunction. 
     - Add internal keyIndexes member in `TableAggregateFunction` to store key 
information. 
     - Support key extraction for table aggregate in `UniqueKeyExtractor`. With 
the key information, we can upsert the result of table aggregate into the 
downstream under some circumstance.
     - Adapt codegen logic to choose `emitUpdateWithoutRetract` when the table 
aggregate operator under Acc mode.
     - Add document about the `emitUpdateWithoutRetract` method. Note that this 
PR has not provided detail examples about `emitUpdateWithoutRetract` and 
`emitUpdateWithRetract` method, because we are going to add these examples in 
the following up FLINK-11147 
   
   
   ## Verifying this change
   
   
   This change added tests and can be verified as follows:
   
     - Add integration tests for upsert into sink.
     - Add java string Expression test. 
`TableAggregateStringExpressionTest.testWithKeysAfterAlias`, 
`TableAggregateStringExpressionTest.testWithKeysWithoutAlias`.
     - Add validation tests. 
`TableAggregateValidationTest.testInvalidNamesInWithKeys`
     - Add harness tests. 
`TableAggregateHarnessTest.testEmitUpdateWithoutRetract`
   
   ## 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 and JavaDocs)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to