xuyangzhong commented on code in PR #26051:
URL: https://github.com/apache/flink/pull/26051#discussion_r1950710265
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecDeduplicate.java:
##########
@@ -339,25 +362,39 @@ OneInputStreamOperator<RowData, RowData>
createDeduplicateOperator() {
}
} else {
if (isAsyncStateEnabled()) {
- AsyncStateRowTimeDeduplicateFunction processFunction =
- new AsyncStateRowTimeDeduplicateFunction(
- rowTypeInfo,
- stateRetentionTime,
- rowtimeIndex,
- generateUpdateBefore,
- generateInsert(),
- keepLastRow);
- return new AsyncKeyedProcessOperator<>(processFunction);
+ if (!keepLastRow && outputInsertOnly) {
+ checkState(canBeInsertOnly(config, keepLastRow));
Review Comment:
Emmm... I meant to add one more assertion to do what you say, as shown below
to ensure consistency between visiting FlinkChangelogModeInferenceProgram
during optimizing and executing this plan. WDYT?
```
checkState(!RankUtil.outputInsertOnlyInDeduplicate(config, keepLastRow));
checkState(!outputInsertOnly)
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]