Hi again, This code can be used to reproduce this behavior:
@FunctionTemplate(name = "asEcho", scope = FunctionTemplate.FunctionScope.SIMPLE, nulls = FunctionTemplate.NullHandling.NULL_IF_NULL) public static class asEcho implements DrillSimpleFunc { @Param VarCharHolder input1; @Output VarCharHolder output; @Inject DrillBuf buffer; public void setup() { } public void eval() { String someValue = input1.buffer.toString(input1.start, input1.end-input1.start, java.nio.charset.Charset.defaultCharset()); output.buffer = buffer.reallocIfNeeded(someValue.length()); for (Byte aByte : someValue.toString().getBytes()) output.buffer.setByte(output.end ++, aByte); } } On Fri, Jan 8, 2016 at 7:43 PM, Stefán Baxter <ste...@activitystream.com> wrote: > Hi, > > This seems to have something to do with reading string values from a > VarCharHolder. > > Here is the code that has stopped working: > > String someValue = input2.buffer.toString(input2.start, input2.end-input2. > start, java.nio.charset.Charset.defaultCharset()) > > > It used to return only the string value but now it returns: > > {DrillBuf[77], udle identityHashCode == 1660956802, identityHashCode == > 343154168} > PT1H > > > The value is there in the second line (Seems to include a newline > character) > > Any ideas? > > Regards, > -Stefan > > > On Fri, Jan 8, 2016 at 7:24 PM, Stefán Baxter <ste...@activitystream.com> > wrote: > >> Hi, >> >> My UDFs have stopped working with the latest version of 1.5-SNAPSHOT >> (pulled just now). >> >> The error is: >> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for >> further details. >> Error: SYSTEM ERROR: IllegalArgumentException: Invalid format: >> "{DrillBuf[74], udle identityHash..." >> >> Fragment 1:5 >> >> [Error Id: 17b0165d-8ff3-4101-961a-0e40fdff0392 on Lightning:31010] >> (state=,code=0) >> >> >> Does anyone know what might be causing this? >> >> (The UDFs are compiled using the same target) >> >> Regards, >> -Stefán >> > >