Hi,
I have a UDF that deals with arrays and concatenates their value. It's
working fine with JSON but when working with Avro it returns an error.
The error seems a bit misleading as it claims to be bot a schema change
exception and a missing function exception.
*The error is:*
Error: SYSTEM ERROR: SchemaChangeException: Failure while trying to
materialize incoming schema. Errors:
Error in expression at index -1. Error: Missing function implementation:
[listassortedcsv(NULL-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--..
*The function does exist and is declared like this:*
@FunctionTemplate(name = "listAsSortedCSV", scope =
FunctionTemplate.FunctionScope.SIMPLE, nulls =
FunctionTemplate.NullHandling.NULL_IF_NULL)
public static class listAsSortedCSV implements DrillSimpleFunc {
@Param
RepeatedVarCharHolder input1;
*In Avro the field is declared like a union:*
{"name": "categories", "type": ["null",{"type":"array", "items": "string"}]}
The data currently only contains null values
I have other functions that deal with null values that work just fine.
Is it possible that the RepeatedVarCharHolder signals "mandatory" values or
is unable to accept null?
Regards,
-Stefan