It might be related to the way you allocate buffer for your text input
in your UDF. It would be helpful if you can share the UDF code to help
people understand the problem.


On Mon, Sep 26, 2016 at 9:55 AM, Sandeep Dugar <[email protected]> wrote:
> Hi ,
>
> I am trying to write a UDF for which the input is text, possibly with 1K 
> characters.
>
> I am trying to get the string value from NullableVarcharHolder via the 
> function 
> org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(input.start,
>  input.end, input.buffer);
>
> This is resulting in error msg as below:
>
> Error: SYSTEM ERROR: IndexOutOfBoundsException: index: 0, length: 257 
> (expected: range(0, 256))
>
> Fragment 1:0
>
>
> Questions:
>
> 1. What should be data type for large input string? Is NullableVarcharHolder 
> correct approach?
> 2. How to get it into string in such scenarios?
>
>
> -
> Thanks,
> Sandeep

Reply via email to