You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Francesco Guardiani (Jira)" <ji...@apache.org> on 2022/03/31 13:32:00 UTC
[jira] [Commented] (FLINK-26327) throw not a literal exception in callContext.getArgumentValue when getTypeInference
[ https://issues.apache.org/jira/browse/FLINK-26327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17515331#comment-17515331 ]
Francesco Guardiani commented on FLINK-26327:
---------------------------------------------
Can you share the code of the Nvl class, or even better a small self-contained reproducer?
> throw not a literal exception in callContext.getArgumentValue when getTypeInference
> -----------------------------------------------------------------------------------
>
> Key: FLINK-26327
> URL: https://issues.apache.org/jira/browse/FLINK-26327
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Affects Versions: 1.14.2
> Reporter: Spongebob
> Priority: Major
>
>
> {code:java}
> //代码占位符
> tableEnvironment.createTemporaryFunction("ROUNDX", RoundX.class);
> tableEnvironment.createTemporaryFunction("NVL", Nvl.class);
> tableEnvironment.executeSql("select ROUNDX( CAST(1.12345 as decimal(10,3)),NVL(MAX(f0),2) ) from t1").print();
> // exception
> Exception in thread "main" java.lang.AssertionError: not a literal: NVL($0, 2)
> // trace
> // `NVL` is a scalarFunction that likes oracle nvl function. And this exception might be thrown from this code in my `getTypeInference` function of ROUNDX scalarFunction.
> Optional<Integer> secondValue = callContext.getArgumentValue(1, Integer.class);{code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)