dongjoon-hyun commented on a change in pull request #754:
URL: https://github.com/apache/orc/pull/754#discussion_r697780859



##########
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:
       I agree with @pgaref 's perspective. Could you elaborate a little bit 
more about your refactoring idea? Is that better?
   >  I actually think this DictionaryUtils class can probably be removed and 
roll the functionality into StringHashTable directly. 




-- 
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


Reply via email to