Skip to content

Commit

Permalink
Merge pull request apache#49 from rongma1997/modify-vectorloader
Browse files Browse the repository at this point in the history
Modify VectorLoader to support native compression
  • Loading branch information
zhouyuan authored May 18, 2020
2 parents 7a60602 + 3fad4b6 commit 6a278e7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public VectorLoader(VectorSchemaRoot root) {
* @param recordBatch the batch to load
*/
public void load(ArrowRecordBatch recordBatch) {
root.setRowCount(recordBatch.getLength());
Iterator<ArrowBuf> buffers = recordBatch.getBuffers().iterator();
Iterator<ArrowFieldNode> nodes = recordBatch.getNodes().iterator();
for (FieldVector fieldVector : root.getFieldVectors()) {
loadBuffers(fieldVector, fieldVector.getField(), buffers, nodes);
}
root.setRowCount(recordBatch.getLength());
if (nodes.hasNext() || buffers.hasNext()) {
throw new IllegalArgumentException("not all nodes and buffers were consumed. nodes: " +
Collections2.toList(nodes).toString() + " buffers: " + Collections2.toList(buffers).toString());
Expand Down

0 comments on commit 6a278e7

Please sign in to comment.