You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Spongebob (Jira)" <ji...@apache.org> on 2022/02/23 09:35:00 UTC
[jira] [Created] (FLINK-26327) throw not a literal exception in callContext.getArgumentValue when getTypeInference
Spongebob created FLINK-26327:
---------------------------------
Summary: 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
{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)