JingsongLi commented on a change in pull request #10625: [FLINK-15259][hive] 
HiveInspector.toInspectors() should convert Flink…
URL: https://github.com/apache/flink/pull/10625#discussion_r361897023
 
 

 ##########
 File path: 
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/module/hive/HiveModuleTest.java
 ##########
 @@ -88,4 +94,24 @@ public void testHiveBuiltInFunction() {
        public void testNonExistFunction() {
                assertFalse(new 
HiveModule(HiveShimLoader.getHiveVersion()).getFunctionDefinition("nonexist").isPresent());
        }
+
+       @Test
+       public void testConstantArguments() throws Exception {
+               TableEnvironment tEnv = 
HiveTestUtils.createTableEnvWithBlinkPlannerBatchMode();
+
+               tEnv.unloadModule("core");
+               tEnv.loadModule("hive", new 
HiveModule(HiveShimLoader.getHiveVersion()));
+
+               List<Row> results = 
TableUtils.collectToList(tEnv.sqlQuery("select concat('an', 'bn')"));
+               assertEquals("[anbn]", results.toString());
+
+               results = TableUtils.collectToList(tEnv.sqlQuery("select 
concat('ab', cast('cdefghi' as varchar(5)))"));
 
 Review comment:
   Can you add a test for `null` literal?

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


With regards,
Apache Git Services

Reply via email to