lirui-apache commented on a change in pull request #11215: 
[FLINK-16275][table-planner-blink] AggsHandlerCodeGenerator can fail …
URL: https://github.com/apache/flink/pull/11215#discussion_r384345272
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/batch/sql/CalcITCase.scala
 ##########
 @@ -1244,4 +1247,40 @@ class CalcITCase extends BatchTestBase {
       Seq(row(1), row(111), row(15), row(34), row(5), row(65), row(null))
     )
   }
+
+  @Test
+  def testRankWithCustomModule(): Unit = {
+    try {
+      tEnv.unloadModule("core")
+      tEnv.loadModule("test-module", new TestModule)
+      tEnv.loadModule("core", CoreModule.INSTANCE)
+      registerCollection("emp",
+        Seq(row("1", "A", 1), row("1", "B", 2), row("2", "C", 3)),
+        new RowTypeInfo(STRING_TYPE_INFO, STRING_TYPE_INFO, INT_TYPE_INFO),
+        "dep,name,salary")
+      checkResult(
+        "select dep,name,rank() over (partition by dep order by salary desc) 
as rnk from emp",
+        Seq(row("1", "A", 2), row("1", "B", 1), row("2", "C", 1)))
+    } finally {
+      val modules = tEnv.listModules()
 
 Review comment:
   I think `BatchTestBase::tEnv` is only initialized once and shared among test 
cases. I'll double check.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to