Java UDF Return Values
In the documentation, if you have a return value that is not numeric you need to specify the size/precision of the return type in a method in the Factory class. In the example, this is done by using the length of an input argument. My problem is that my processing block takes this data and potentially makes the size smaller than the input value. When I return the value, it seems to back fill any chars to the new Varchar until it fills all the space specified in the Factory class(e.g. input arg = 'ATGC' and the output value = 'TGC' dropping the 'A'. What appears when I use the function in SQL is 'TCGT'). This is unexpected and undesired for my application. Is there anyway for setting the size of the return value dynamically so that no back filling takes place?