[ 
https://issues.apache.org/jira/browse/FLINK-16732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated FLINK-16732:
-----------------------------------
    Labels: pull-request-available  (was: )

> Failed to call Hive UDF with constant return value
> --------------------------------------------------
>
>                 Key: FLINK-16732
>                 URL: https://issues.apache.org/jira/browse/FLINK-16732
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / Hive
>    Affects Versions: 1.10.0
>            Reporter: Rui Li
>            Priority: Major
>              Labels: pull-request-available
>
> The following test fails:
> {code}
>       @Test
>       public void test() throws Exception {
>               tableEnv.unloadModule("core");
>               tableEnv.loadModule("hive", new HiveModule());
>               tableEnv.loadModule("core", CoreModule.INSTANCE);
>               
> System.out.println(TableUtils.collectToList(tableEnv.sqlQuery("select 
> str_to_map('a:1,b:2,c:3',',',':')")));
>       }
> {code}
> With exception:
> {noformat}
> Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to 
> org.apache.hadoop.io.Text
>       at 
> org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableStringObjectInspector.getPrimitiveJavaObject(WritableStringObjectInspector.java:46)
>       at 
> org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableStringObjectInspector.getPrimitiveJavaObject(WritableStringObjectInspector.java:26)
>       at 
> org.apache.flink.table.functions.hive.conversion.HiveInspectors.toFlinkObject(HiveInspectors.java:277)
>       at 
> org.apache.flink.table.functions.hive.conversion.HiveInspectors.toFlinkObject(HiveInspectors.java:319)
>       at 
> org.apache.flink.table.functions.hive.HiveGenericUDF.evalInternal(HiveGenericUDF.java:86)
>       at 
> org.apache.flink.table.functions.hive.HiveScalarFunction.eval(HiveScalarFunction.java:100)
> ......
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to