Vargs UDF is not supported in Calcite now. There are some discussions[1] and on-going work[2] for it.
[1] https://issues.apache.org/jira/browse/CALCITE-2772 [2] https://github.com/apache/calcite/pull/1405] 月宫的木马兔 <[email protected]> 于2020年2月11日周二 上午10:20写道: > hi experts, > I'm using Apache Calcite to validate SQL. The problem is when I add a > UDF with variable number parameter, the validator can not find this > function. > > Version of Calcite is 1.21.0 > > Here this is my code. > > *TestfuncFunction.java* > > public class ConcatFunction { > public String eval(String... arg0) { > return ""; > }} > > *AddUDF:* > > SchemaPlus schemaPlus = Frameworks.createRootSchema(true); > > schemaPlus.add("CONCAT", > ScalarFunctionImpl.create(ConcatFunction.class),"eval")); > > *SQL:* select concat(name, " ") from test_table > > *Exception:* > > > > > > >
