Reply
Highlighted
New Contributor
Posts: 3
Registered: ‎09-30-2016

impala udf structure types

Is it possible to define structure types for udfs? (http://www.cloudera.com/documentation/archive/impala/1-x/1-2-4/Installing-and-Using-Impala/ciiu_udf....) Or what will be the best way to return several double numbers from udf?

Cloudera Employee
Posts: 307
Registered: ‎10-16-2013

Re: impala udf structure types

I'm afraid complex types, e.g., structs are currently not supported as UDF return or argument types.

 

As a workaround you could try the following solutions:

- pack the two doubles into a DECIMAL(38,0) or STRING

- you'll need a second UDF to unpack the individual doubles