You can translate the question and the replies:

Returning an existing compound type from executeReturnType

I have a bunch of complex compound types defined via CREATE TYPE syntax. Can I use them as a custom function return type, that is, return this type from executeReturnType()? E.g. something like this: ``` @CustomExecutorReturnType public CustomRecordType executeReturnType (@CustomParam(name = "register") CustomRecordType r) { return CustomElementsUtil.useExistingType("my_type"); } ``` That would save us from re-implementing such types in Java.
user
27-06-2020 07:23:06 -0400
code

1 Answer

Hi, You can implement these compound types in JAVA first for the custom function code to work as you would need to use the [VDP equivalent data types in JAVA](https://community.denodo.com/docs/html/browse/7.0/vdp/developer/developing_extensions/developing_custom_functions/developing_custom_functions#equivalency-between-java-and-virtual-dataport-data-types). And if in your scenario, the returned type is a compound data type, the type will be created in Virtual DataPort, unless it already exists and If the returned type does not have name, the type will be created with a random name. You can read more about this in [Developing Custom Function: Compound Types](https://community.denodo.com/docs/html/browse/7.0/vdp/developer/developing_extensions/developing_custom_functions/compound_types#compound-types) section of the manual. Hope this helps!
Denodo Team
29-06-2020 09:43:17 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here