ihuzenko commented on a change in pull request #1929: DRILL-6832: Remove the 
old "unmanaged" external sort
URL: https://github.com/apache/drill/pull/1929#discussion_r360508494
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/MSortTemplate.java
 ##########
 @@ -89,15 +98,28 @@ public void setup(final FragmentContext context, final 
BufferAllocator allocator
    * ExternalSortBatch to make decisions about whether to spill or not.
    *
    * @param recordCount
-   * @return The amount of memory MSorter needs for a given record count.
+   * @return
    */
   public static long memoryNeeded(final int recordCount) {
-    // We need 4 bytes (SV4) for each record, power of 2 rounded.
+    // We need 4 bytes (SV4) for each record.
+    // The memory allocator will round this to the next
+    // power of 2.
 
     return BaseAllocator.nextPowerOfTwo(recordCount * 4);
   }
 
-  private int merge(final int leftStart, final int rightStart, final int 
rightEnd, final int outStart) {
+  /**
+   * Given two regions within the selection vector 4 (a left and a right), 
merge
+   * the two regions to produce a combined output region in the auxiliary
+   * selection vector.
+   *
+   * @param leftStart
+   * @param rightStart
+   * @param rightEnd
+   * @param outStart
+   * @return
 
 Review comment:
   please finish the javadoc

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to