Could you paste your code that shows how the SqlOperatorTable is
constructed?  the IF operator is defined in SqlLibraryOperators class and
you can get corresponding operator table through SqlOperatorTable opTab =
SqlLibraryOperatorTableFactory.INSTANCE.getOperatorTable(EnumSet.of(SqlLibrary
sqlLibrary)), any of SqlLibrary.BIG_QUERY, SqlLibrary.HIVE,
SqlLibrary.SPARK will work. Another option may be
SqlValidator.Config.DEFAULT.withLenientOperatorLookup(true), which will be
lenient when encountering an unknown function.

wrstrs <[email protected]> 于2021年7月26日周一 下午8:02写道:

> hi, all
>
> how to solve this problem?
>
>
>
>
> Caused by: org.apache.calcite.sql.validate.SqlValidatorException: No match
> found for function signature IF(<BOOLEAN&gt;, <NUMERIC&gt;, <NUMERIC&gt;)
>
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

Reply via email to