wuchong commented on a change in pull request #14610: URL: https://github.com/apache/flink/pull/14610#discussion_r558115913
########## File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/DeduplicateTest.scala ########## @@ -141,6 +162,27 @@ class DeduplicateTest extends TableTestBase { util.verifyExecPlan(sql) } + @Test + def testMiniBatchInferLastRowOnRowtime(): Unit = { + util.tableEnv.getConfig.getConfiguration.setBoolean(TABLE_EXEC_MINIBATCH_ENABLED, true) + util.tableEnv.getConfig.getConfiguration.setLong(TABLE_EXEC_MINIBATCH_SIZE, 3L) + util.tableEnv.getConfig.getConfiguration.set( + TABLE_EXEC_MINIBATCH_ALLOW_LATENCY, Duration.ofSeconds(1)) + val sql = + """ + |SELECT COUNT(b) FROM ( + | SELECT a, b, c + | FROM ( + | SELECT *, + | ROW_NUMBER() OVER (PARTITION BY a ORDER BY rowtime DESC) as rank_num + | FROM MyTable) Review comment: `MyTable` is view from DataStream. Would be great if we can add test for DDL with watermark to verify `MiniBatchAssigner` also works well with `WatermarkAssigner`. ---------------------------------------------------------------- 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