You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by GitBox <gi...@apache.org> on 2022/10/09 02:09:39 UTC

[GitHub] [orc] wgtmac commented on a diff in pull request #1273: ORC-1285: [Java Core] Refactor selected vector support

wgtmac commented on code in PR #1273:
URL: https://github.com/apache/orc/pull/1273#discussion_r990719865


##########
java/core/src/java/org/apache/orc/impl/WriterImpl.java:
##########
@@ -1018,4 +1005,20 @@ private WriterEncryptionVariant[] setupEncryption(
   public long estimateMemory() {
     return this.treeWriter.estimateMemory();
   }
+
+  /**
+   * Get next chunk size if row selected enable.
+   * We will find the longest size of chunk that will be less than maxSize.
+   * @param posn the position where we are
+   * @param maxSize the largest chunk size in this selection
+   */
+  private int nextSelectedRowSize(int posn, int maxSize, int[] selected) {

Review Comment:
   Good refactoring. The only concern is that before the change we know posn and (posn + len) will never exceed selected.length. The new method has potential misuse if someone else has passed wrong maxSize when calling it.



-- 
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: issues-unsubscribe@orc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org