wuchong commented on code in PR #20413: URL: https://github.com/apache/flink/pull/20413#discussion_r939524080
########## flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/HiveDialectITCase.java: ########## @@ -1121,6 +1122,35 @@ public void testSetCommand() throws Exception { assertThat(result.toString()).isEqualTo(String.format("[+I[%s]]", path)); } + @Test + public void testAddCommand() { + TableEnvironmentInternal tableEnvInternal = (TableEnvironmentInternal) tableEnv; + Parser parser = tableEnvInternal.getParser(); + + // test add jar + Operation operation = parser.parse("add jar test.jar").get(0); + assertThat(operation).isInstanceOf(AddJarOperation.class); + assertThat(((AddJarOperation) operation).getPath()).isEqualTo("test.jar"); + // test add jar with variable substitute + operation = parser.parse("add jar \"${hiveconf:common-key}.jar\"").get(0); + assertThat(operation).isInstanceOf(AddJarOperation.class); + assertThat(((AddJarOperation) operation).getPath()).isEqualTo("\"common-val.jar\""); Review Comment: I added a commit to remove the quotes. If we want to verify negative behavior, please add exception tests. It seems Hive doesn't support double and single quotes on the path. We can support this feature in the future if users want 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org