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

    https://github.com/apache/drill/pull/283#discussion_r46308724
  
    --- Diff: exec/memory/base/src/main/java/io/netty/buffer/DrillBuf.java ---
    @@ -252,32 +282,25 @@ public int capacity() {
       }
     
       @Override
    -  public synchronized ByteBuf capacity(int newCapacity) {
    -    if (rootBuffer) {
    -      if (newCapacity == length) {
    -        return this;
    -      } else if (newCapacity < length) {
    -        b.capacity(newCapacity);
    -        int diff = length - b.capacity();
    -        acct.releasePartial(this, diff);
    -        this.length = length - diff;
    -        return this;
    -      } else {
    -        throw new UnsupportedOperationException("Accounting byte buf 
doesn't support increasing allocations.");
    -      }
    -    } else {
    -      throw new UnsupportedOperationException("Non root bufs doen't 
support changing allocations.");
    +  public synchronized DrillBuf capacity(int newCapacity) {
    --- End diff --
    
    ```trim(int newCapacity)```?


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