[
https://issues.apache.org/jira/browse/FLINK-26474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17501130#comment-17501130
]
luoyuxia commented on FLINK-26474:
----------------------------------
I would like to fix it.
> Fail to call hive udf when secondary parameter required constant but pass
> value like "-1"
> ------------------------------------------------------------------------------------------
>
> Key: FLINK-26474
> URL: https://issues.apache.org/jira/browse/FLINK-26474
> Project: Flink
> Issue Type: Sub-task
> Components: Connectors / Hive
> Reporter: luoyuxia
> Priority: Major
> Fix For: 1.16.0
>
>
> The exception can be reproduced using following code in HiveDialectITCase
> {code:java}
> HiveModule hiveModule = new HiveModule(hiveCatalog.getHiveVersion());
> CoreModule coreModule = CoreModule.INSTANCE;
> for (String loaded : tableEnv.listModules()) {
> tableEnv.unloadModule(loaded);
> }
> tableEnv.loadModule("hive", hiveModule);
> tableEnv.loadModule("core", coreModule);
> List<Row> results = CollectionUtil.iteratorToList(tableEnv.executeSql("select
> bround(55.0, -1)").collect());
> {code}
> It will case such exception "BROUND second argument only takes constant", the
> reson is the parameter "-1" will be considered as function call instead of
> contant, we should reduce it just like what has done in
> HiveParserTypeCheckProcFactory#getXpathOrFuncExprNodeDesc to reduce "+".
--
This message was sent by Atlassian Jira
(v8.20.1#820001)