drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #715: DRILL-5105: remove buffer size checking in getBuffe...
Date Sun, 01 Jan 2017 20:50:41 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/715#discussion_r94288743
  
    --- Diff: exec/vector/src/main/java/org/apache/drill/exec/vector/complex/MapVector.java
---
    @@ -134,10 +134,6 @@ public int getBufferSizeFor(final int valueCount) {
     
       @Override
       public DrillBuf[] getBuffers(boolean clear) {
    --- End diff --
    
    perhaps replace with:
    ```
    assert getBufferSize() == super.getBufferSize();
    ```
    
    We still get the benefit of the check in tests; but the assert is ignored in production
runs. This is, in fact, the advantage of the Java `assert` statement over the Guava `Preconditions`
methods.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message