Skip to content

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?


@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