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 2019/11/05 11:10:51 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #10039: [FLINK-14262][table] Support referencing function with fully/partially qualified names in SQL

JingsongLi commented on a change in pull request #10039: [FLINK-14262][table]  Support referencing function with fully/partially qualified names in SQL
URL: https://github.com/apache/flink/pull/10039#discussion_r342505156
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/catalog/CatalogTableITCase.scala
 ##########
 @@ -84,6 +94,41 @@ class CatalogTableITCase(isStreamingMode: Boolean) {
     tableEnv.execute(name)
   }
 
+  private def testUdf(sql: String): Unit = {
+    val sinkDDL =
+      """
+        |create table sinkT(
+        |  a bigint
+        |) with (
+        |  'connector' = 'COLLECTION'
+        |)
+      """.stripMargin
+    tableEnv.sqlUpdate(sinkDDL)
+    tableEnv.sqlUpdate(sql)
+    tableEnv.execute("")
+    assertEquals(Seq(toRow(2L)), TestCollectionTableFactory.RESULT.sorted)
+  }
+
+  @Test
+  def testUdfWithFullIdentifier(): Unit = {
+    testUdf("insert into sinkT select default_catalog.default_database.myfunc(cast(1 as bigint))")
 
 Review comment:
   Below tests have tested default_database.myfunc and myfunc.
   Temproary system function only has one name, we have many tests in our previous codes.
   Temproary catalog function is not ready now, we don't have methods to register it now...

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


With regards,
Apache Git Services