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_r360515173
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/MSortTemplate.java
 ##########
 @@ -123,14 +145,24 @@ public SelectionVector4 getSV4() {
     return vector4;
   }
 
+  /**
+   * Merge a set of pre-sorted runs to produce a combined
+   * result set. Merging is done in the selection vector, record data does
+   * not move.
+   * <p>
+   * Runs are merge pairwise in multiple passes, providing performance
+   * of O(n * m * log(n)), where n = number of runs, m = number of records
+   * per run.
+   */
+
   @Override
-  public void sort(final VectorContainer container) {
+  public void sort() {
     while (runStarts.size() > 1) {
+      final int totalCount = this.vector4.getTotalCount();
 
-      // check if we're cancelled/failed frequently
+      // check if we're cancelled/failed recently
       if (!context.getExecutorState().shouldContinue()) {
-        return;
-      }
+        return; }
 
 Review comment:
   ```suggestion
           return; 
         }
   ```

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