Myracle commented on code in PR #20361:
URL: https://github.com/apache/flink/pull/20361#discussion_r935046346
##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/TableEnvironmentTest.scala:
##########
@@ -155,6 +164,23 @@ class TableEnvironmentTest {
verifyTableEnvironmentExecutionExplain(tEnv)
}
+ @Test
+ def testAddAndShowJar(): Unit = {
+ val jarPath = UserClassLoaderJarTestUtils
+ .createJarFile(
+ tempFolder.newFolder(String.format("test-jar-%s", UUID.randomUUID)),
+ "test-classloader-udf.jar",
+ GENERATED_LOWER_UDF_CLASS,
+ String.format(GENERATED_LOWER_UDF_CODE, GENERATED_LOWER_UDF_CLASS)
+ )
+ .getPath
+
+ tableEnv.executeSql("add JAR '" + jarPath + "'")
+ val tableResult = tableEnv.executeSql("SHOW JARS")
+
+ checkData(util.Arrays.asList(Row.of(jarPath)).iterator(),
tableResult.collect())
Review Comment:
It is ok to assert the ResultKind. Since there is already a method
checkData, why not just use it?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]