Once there is a better understanding of how complex types could be added to builtin functions then we can expose the complex type support through UDFs by allowing complex types as parameters or as return values.
The reason this should come as a second step is that once we have exposed these UDF changes we have to keep backward compatibility in the following releases so there won’t be much room to adjust.
What brings some complexity is that CollectionVal uses Impala’s internal tuple representation and it is not trivial to expose through UDFs. There might be 2 ways:
- Expose helper functions to extract tuples, fields, etc.
- For UDFs use a different representation than tuples and translate them to the internal representation when a UDF is called.