Github user Ben-Zvi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/860#discussion_r124121514
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/MSortTemplate.java
 ---
    @@ -92,8 +93,9 @@ public void setup(final FragmentContext context, final 
BufferAllocator allocator
        * @return
        */
       public static long memoryNeeded(final int recordCount) {
    -    // We need 4 bytes (SV4) for each record.
    -    return recordCount * 4;
    +    // We need 4 bytes (SV4) for each record, power of 2 rounded.
    --- End diff --
    
    Does the implementation of __memoryNeeded()__ in 
SortRecordBatchBuilder.java also need to be similarly modified ?
      And a minor comment: Would the name __memoryNeededForSV4()__ be more 
descriptive ?  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to