You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/15 09:46:42 UTC

[GitHub] [flink] wuchong commented on a change in pull request #14610: [FLINK-20909][table-planner-blink] Fix deduplicate mini-batch interval infer

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:
users@infra.apache.org