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

Jingsong Lee resolved FLINK-16732.
----------------------------------
    Resolution: Fixed

master: b7a83ff45ef0bf29c03616f542ff6d1abf22e2e2

release-1.10: f9f63a4c11cf13f56ad06d9da6231d711477f28e

> 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
>            Assignee: Rui Li
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.10.1
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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