TJX2014 commented on a change in pull request #12819:
URL: https://github.com/apache/flink/pull/12819#discussion_r449990273



##########
File path: 
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/TableScanTest.scala
##########
@@ -357,4 +357,20 @@ class TableScanTest extends TableTestBase {
         |)
       """.stripMargin)
   }
+
+  @Test
+  def testRowNumOverWindow(): Unit = {
+    util.addTable(
+      """
+        |CREATE TABLE src (
+        |  name STRING,
+        |  age BIGINT
+        |) WITH (
+        |  'connector' = 'values'
+        |)
+      """.stripMargin)
+    util.tableEnv.executeSql("create view src_view as select *, " +
+      "ROW_NUMBER() OVER (PARTITION BY name ORDER BY age DESC) as row_num from 
src")
+    util.verifyPlan("select name, age, row_num from src_view where row_num <= 
3")

Review comment:
       @wuchong Thank you for your suggestion, I have made the test code clean 
and meaningful.




----------------------------------------------------------------
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


Reply via email to