David Mollitor created ORC-831: ---------------------------------- Summary: Do Not Copy String When Flushing Dictionary Key: ORC-831 URL: https://issues.apache.org/jira/browse/ORC-831 Project: ORC Issue Type: Improvement Components: Java Reporter: David Mollitor Assignee: David Mollitor
{code:java|Title=StringBaseTreeWriter.java} if (useDictionaryEncoding) { rowOutput.write(dumpOrder[rows.get(i)]); } else { dictionary.getText(text, rows.get(i)); directStreamOutput.write(text.getBytes(), 0, text.getLength()); lengthOutput.write(text.getLength()); } {code} The code to {{flush}} first loads (copies) the data into a {{Text}} object and then writes it to the direct stream. Instead, pass the directStream to the dictionary and have it write directly to the stream instead of an intermediate {{Text}} object. -- This message was sent by Atlassian Jira (v8.3.4#803005)