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

DRILL-7093 Batch Sizing in SingleSender #1691

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karthik-man
Copy link

This PR contains changes for implementing batch sizing in SingleSender. The sizing is done by using the RecordBatchSizer.


@Override
public WritableBatch getWritableBatch(int startIndex, int length) {
VectorContainer partialContainer = new VectorContainer(context.getAllocator(), getSchema());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like getWritableBatch in MergingRecordBatch, SpilledRecordBatch, AbstractRecordBatch and RecordBatchLoader is same. Is there any way to write a common function in the hierarchy and use it in all these scenarios?

@@ -88,6 +88,11 @@ public WritableBatch getWritableBatch() {
throw new UnsupportedOperationException();
}

@Override
public WritableBatch getWritableBatch(int start, int length) {
throw new UnsupportedOperationException();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a string in similar lines to that of SchemalessBatch exception.

@HanumathRao
Copy link
Contributor

Code changes look good to me. I have few minor comments.

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.

2 participants