You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Steshin (Jira)" <ji...@apache.org> on 2025/02/14 09:43:00 UTC
[jira] [Assigned] (IGNITE-24350) Calcite. Absense of error on same-signature UDF registration.
[ https://issues.apache.org/jira/browse/IGNITE-24350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Steshin reassigned IGNITE-24350:
-----------------------------------------
Release Note: Registration of user-defined SQL functions with duplicated signatures is now forbidden
Assignee: Vladimir Steshin
> 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
> Affects Versions: 2.17
> Reporter: Vladimir Steshin
> Assignee: Vladimir Steshin
> Priority: Minor
> Labels: calcite, ignite-2, ise
> Fix For: 2.18
>
>
> We should produce an error if user registers an 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)