Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORC-216: VectorRowBatch creation from TypeDescription invalidates batch size #139

Closed
wants to merge 1 commit into from

Conversation

prasanthj
Copy link
Contributor

TypeDescription.createRowBatch() always resets the size to 0.

public VectorizedRowBatch createRowBatch(int maxSize) {
VectorizedRowBatch result;
if (category == Category.STRUCT) {
result = new VectorizedRowBatch(children.size(), maxSize);
for(int i=0; i < result.cols.length; ++i) {
result.cols[i] = children.get(i).createColumn(maxSize);
}
} else {
result = new VectorizedRowBatch(1, maxSize);
result.cols[0] = createColumn(maxSize);
}
result.reset();

@omalley
Copy link
Contributor

omalley commented Jul 25, 2017

This isn't a bug. The batch has no rows when created and thus batch.size should be 0. batch.getMaxSize() will return the capacity.

@prasanthj prasanthj closed this Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants