pnowojski commented on code in PR #26051: URL: https://github.com/apache/flink/pull/26051#discussion_r1951073995
########## 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: Ahh, sorry I misunderstood you. You mean why don't I add the reverse check state in the else branch below? The problem with that is that old compiled plans would fail that check state. I mean plans that were created before this PR, but are executed with this PR. `RankUtil.outputInsertOnlyInDeduplicate(config, keepLastRow)` could return `true` for them, while `outputInsertOnly` is false (absent value/null interpreted as false) -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org