You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2022/07/22 02:33:00 UTC

[jira] [Assigned] (FLINK-26474) Fail to call hive udf when secondary parameter required constant but pass value like "-1"

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

Jark Wu reassigned FLINK-26474:
-------------------------------

    Assignee: luoyuxia

> 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
>            Assignee: luoyuxia
>            Priority: Major
>              Labels: pull-request-available
>             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 fold it in HiveParserTypeCheckProcFactory#getXpathOrFuncExprNodeDesc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)