You can translate the question and the replies:

Passing arrays to custom functions as parrameters

Hi, I was trying to acheive a function with signature as, `public Double actualPremiumOrAcqExpOrNonDirExpCalcYearly(Double[] val1, Integer val2, Double val3)` But I am not getting any luck to acheive this. Is it possible to pass a combination of parameter types in Denodo custom functions ? Help is greatly appreciated. Thanks, Arun
user
04-10-2018 20:51:00 -0400
code

3 Answers

Hi, Yes, it is possible to pass a combination of parameter types in Denodo customer function. The type of method parameters has to be a basic Java type (i.e. String, Integer, Long, Float, etc.). If you are developing a function that needs to take in an array of values, you would need to use either *CustomRecordValue* or *CustomRecordArray* in the signature of the custom function. You may refer to the [Compound Types](https://community.denodo.com/docs/html/browse/7.0/vdp/developer/developing_extensions/developing_custom_functions/compound_types) section of the Virtual DataPort Developer Guide for more information. Hope this helps!
Denodo Team
08-10-2018 03:08:09 -0400
code
Hi, Thank you for the update, I wonder whether you have any example code base which I can refer to ?
user
08-10-2018 20:29:27 -0400
Also, how to pass an array as parameter to the custom method? Is it like below ? ``` function1('testval1', [4.3, 4.2, 4.1], 'testval2') ```
user
08-10-2018 21:02:20 -0400
You must sign in to add an answer. If you do not have an account, you can register here