[
https://issues.apache.org/jira/browse/DRILL-3920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14955458#comment-14955458
]
ASF GitHub Bot commented on DRILL-3920:
---------------------------------------
Github user cwestin commented on a diff in the pull request:
https://github.com/apache/drill/pull/194#discussion_r41908122
--- 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 --
Done.
> Add vector loading tests
> ------------------------
>
> Key: DRILL-3920
> URL: https://issues.apache.org/jira/browse/DRILL-3920
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Data Types
> Affects Versions: 1.2.0
> Reporter: Chris Westin
> Assignee: Chris Westin
>
> Add some additional tests to TestValueVector to test serialization and
> reloading of vectors, as well as the underlying buffer slicing operations
> that are used for this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)