belugabehr commented on a change in pull request #754: URL: https://github.com/apache/orc/pull/754#discussion_r697051082
########## File path: java/core/src/java/org/apache/orc/impl/DictionaryUtils.java ########## @@ -46,6 +47,18 @@ public static void getTextInternal(Text result, int position, byteArray.setText(result, offset, length); } + public static ByteBuffer getTextInternal(int position, DynamicIntArray keyOffsets, + DynamicByteArray byteArray) { + final int offset = keyOffsets.get(position); + final int length; + if (position + 1 == keyOffsets.size()) { + length = byteArray.size() - offset; + } else { + length = keyOffsets.get(position + 1) - offset; + } Review comment: Ya, I know what you mean, the issue is that such a helper function needs to return 2 values `offset` and `length`. Would need to create some sort of data structure which would hamper performance. I'm not too worried about it because some of these methods will go away once ORC is weaned off the Hadoop stuff (i.e., Text) then one or more of these methods will go away. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@orc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org