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

Vladimir Steshin updated IGNITE-24350:
--------------------------------------
    Labels: calcite ignite-2 ise  (was: )

> Calcite. Absense of error on same-signature UDF registration.
> -------------------------------------------------------------
>
>                 Key: IGNITE-24350
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24350
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Vladimir Steshin
>            Priority: Minor
>              Labels: calcite, ignite-2, ise
>
> We should produce an error if user registers user-defined SQL function with 
> duplicated signature. Currently it is possible to add several functions with 
> the same name and parameters via _CacheConfiguration#setSqlFunctionClasses()_
> Example:
> {code:java}
>     public static class UDF {
>         @QuerySqlFunction
>         public static String fun(int v) {
>             return "echo_" + v;
>         }
>         @QuerySqlFunction(alias = "fun")
>         public static int fun2(int v) {
>             return v;
>         }
>         
>         // No error or log message here.
>         ignite.getOrCreateCache(new CacheConfiguration<Integer, 
> Integer>("testCache")
>             .setSqlFunctionClasses(UDF.class));
>         // Fails. A string is returned.
>         assertQuery("SELECT \"testCache\".fun(1)").returns(1).check();
>     }
> {code}



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

Reply via email to