[
https://issues.apache.org/jira/browse/FLINK-16568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Danny Chen updated FLINK-16568:
-------------------------------
Fix Version/s: (was: 1.11.0)
1.12.0
> Cannot call Hive UDAF that requires constant arguments
> ------------------------------------------------------
>
> Key: FLINK-16568
> URL: https://issues.apache.org/jira/browse/FLINK-16568
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Hive, Documentation
> Reporter: Rui Li
> Priority: Major
> Fix For: 1.12.0
>
>
> Calling Hive's {{percentile_approx}} would fail:
> {code}
> hiveShell.execute("create table src (key double,val string)");
> tableEnv.loadModule("hive", new HiveModule());
> tableEnv.sqlQuery("select percentile_approx(key,0.5) from src");
> TableUtils.collectToList(tableEnv.sqlQuery("select
> percentile_approx(key,0.5) from src"));
> {code}
> With error:
> {noformat}
> Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException: The
> second argument must be a constant, but decimal(2,1) was passed instead.
> at
> org.apache.hadoop.hive.ql.udf.generic.GenericUDAFPercentileApprox.getEvaluator(GenericUDAFPercentileApprox.java:145)
> at
> org.apache.flink.table.functions.hive.HiveGenericUDAF.createEvaluator(HiveGenericUDAF.java:120)
> at
> org.apache.flink.table.functions.hive.HiveGenericUDAF.init(HiveGenericUDAF.java:92)
> at
> org.apache.flink.table.functions.hive.HiveGenericUDAF.getHiveResultType(HiveGenericUDAF.java:196)
> ... 58 more
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)