drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cwestin <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-3920 Add vector loading tests
Date Mon, 12 Oct 2015 23:28:12 GMT
Github user cwestin commented on a diff in the pull request:

    https://github.com/apache/drill/pull/194#discussion_r41812350
  
    --- Diff: exec/java-exec/src/test/java/org/apache/drill/exec/record/vector/TestValueVector.java
---
    @@ -223,14 +231,187 @@ public void testNullableVarLen2() {
         }
       }
     
    +  private static DrillBuf combineBuffers(final BufferAllocator allocator, final DrillBuf[]
buffers) {
    +    // find the total size we'll need
    +    int size = 0;
    +    for(final DrillBuf buffer : buffers) {
    +      size += buffer.readableBytes();
    +    }
    +
    +    // create the new buffer
    +    final DrillBuf newBuf = allocator.buffer(size);
    +    final DrillBuf writeBuf = newBuf;
    +    for(final DrillBuf buffer : buffers) {
    +      final DrillBuf readBuf = (DrillBuf) buffer.slice();
    +      final int nBytes = readBuf.readableBytes();
    --- End diff --
    
    I don't see how that handles multiple buffers.


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