You can translate the question and the replies:

Custom functions jar file renaming and name conflicts

Hello, When we started developing custom functions in Denodo, we had stored them all in a single package. However, we have now reached about 200 custom functions and in order to simplify maintenance, we would like to split that package in 3 (Date functions, String functions, Internal processing functions). The problem is, those 3 new packages will contains the same functions as the original package. Which means we cannot import it in Denodo as is, because of conflicting functions names. And removing the current package will delete the elements using the functions the package contains, which is absolutely out of the question. Any workaround that would allow to proceed to this kind of operation ? Thank you !
user
26-05-2021 06:47:48 -0400
code

3 Answers

Hi, If I understand your situation correctly, you want to create 3 new packages to better organize your functions, but in copying the functions over to the new packages, this is introducing name-conflict errors. As per the [rules for developing custom functions](https://community.denodo.com/docs/html/browse/8.0/en/vdp/developer/developing_extensions/developing_custom_functions/developing_custom_functions), functions with the same names are not allowed. So across all of your packages, there must be unique names for all functions and no duplicate implementations. With this in mind, one possible solution I can think of in your situation would be to create those 3 new packages with their respective functions, but then delete the implementation of any “Date”, “String”, and “Internal Processing” functions from the original package, so they are not defined more than once. That however would involve altering/deleting the original package, which as you said, is out of the question. So I believe the only solutions would be to either alter/delete the old package, or change the function names in the new packages so that there is no conflict. Hope this helps!
Denodo Team
26-05-2021 17:34:40 -0400
code
Hi, So the solution you propose is to create new names for those functions in the new packages. Then edit the about 500 elements in Denodo using the old function, so they use the new functions, then delete the old package. That seems... intense for such a small change. It won't be an acceptable solution for us either. I guess we'll keep a single package then. As always, thank you for your answer !
user
27-05-2021 05:25:42 -0400
Hi, I understand that the provided answer may not work for you since you have many VDP elements dependent on the original package. However, with the given constraints of creating custom functions, like enforcing unique function names, the answer provided previously is the only workaround I am aware of that could make this change possible. Hope this helps!
Denodo Team
09-06-2021 18:20:55 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here