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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to