Q:

Apache PHOENIX - UDF Returns VARCHAR array - Create command

I created UDF to return array of VARCHAR.
What is the syntax for the function creation on the terminal especially if the return is of type VARCHAR ARRAY.
for example if the UDF returns VARCHAR:
CREATE FUNCTION "return_VARCHAR"(varchar) returns VARCHAR as 'GetNumbersFunction' USING JAR 'hdfs://127.0.0.1:2181/tmp/local/jar/return_VARCHAR.jar';

How to define the UDF if it returns returns VARCHAR[]   => VARCHAR ARRAY?
CREATE FUNCTION "return_VARCHAR_array"(varchar) returns ??????? as 'GetNumbersFunction' USING JAR 'hdfs://127.0.0.1:2181/tmp/local/jar/return_VARCHAR_ARRAY.jar'

A:

I found the solution it is VARCHAR_ARRAY. so if you need to return VARCHAR[] of te function RETUENARRAY_FUN, following is the UDF registration statement:
CREATE FUNCTION "RETURNARRAY_FUN"(varchar) returns VARCHAR_ARRAY as 'RETURNARRAYFUNCTION'  USING JAR 'hdfs://127.0.0.1:2181/tmp/local/jar/RETURNARRAYFUN.jar'

