Github user cwestin commented on a diff in the pull request:

    https://github.com/apache/drill/pull/133#discussion_r39320204
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/ops/BufferManager.java ---
    @@ -51,11 +48,12 @@ public BufferManager(BufferAllocator allocator, 
FragmentContext fragmentContext)
         this.fragmentContext = fragmentContext;
       }
     
    +  @Override
       public void close() throws Exception {
    -    Object[] mbuffers = 
((LongObjectOpenHashMap<Object>)(Object)managedBuffers).values;
    -    for (int i =0; i < mbuffers.length; i++) {
    +    final Object[] mbuffers = ((LongObjectOpenHashMap<Object>) (Object) 
managedBuffers).values;
    +    for (int i = 0; i < mbuffers.length; i++) {
           if (managedBuffers.allocated[i]) {
    -        ((DrillBuf)mbuffers[i]).release();
    +        ((DrillBuf) mbuffers[i]).release(1);
    --- End diff --
    
    It saves a function call; seems desirable in tight loops and low-level 
value vector situations.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to