Github user gparai commented on a diff in the pull request: https://github.com/apache/drill/pull/604#discussion_r82294640 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java --- @@ -1540,15 +1540,16 @@ public void eval() { public static class BinaryString implements DrillSimpleFunc { @Param VarCharHolder in; @Output VarBinaryHolder out; + @Inject DrillBuf buffer; @Override public void setup() {} @Override public void eval() { - out.buffer = in.buffer; - out.start = in.start; - out.end = org.apache.drill.common.util.DrillStringUtils.parseBinaryString(in.buffer, in.start, in.end); + out.buffer = buffer.reallocIfNeeded(in.end - in.start); + out.start = out.end = 0; + out.end = org.apache.drill.common.util.DrillStringUtils.parseBinaryString(in.buffer, in.start, in.end, out.buffer); out.buffer.setIndex(out.start, out.end); --- End diff -- Do we still need to set the index?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---