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

    https://github.com/apache/drill/pull/860#discussion_r124437209
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/managed/SortMemoryManager.java
 ---
    @@ -97,24 +215,43 @@
     
       private SortConfig config;
     
    -  private int estimatedInputSize;
    -
       private boolean potentialOverflow;
     
    -  public SortMemoryManager(SortConfig config, long memoryLimit) {
    +  private boolean isLowMemory;
    +
    +  private boolean performanceWarning;
    +
    +  public SortMemoryManager(SortConfig config, long opMemoryLimit) {
         this.config = config;
     
         // The maximum memory this operator can use as set by the
         // operator definition (propagated to the allocator.)
     
         if (config.maxMemory() > 0) {
    --- End diff --
    
    Since opMemoryLimit > 0, it can be put in the if() condition instead of 0, 
hence no need for the Math.min() . (Also the whole statement can be written in 
a single code line using ?:  )



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