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

ARROW-8158: [Java] Getting length of data buffer and base variable width vector #6684

Closed
wants to merge 3 commits into from

Conversation

tianchen92
Copy link
Contributor

For string data buffer and base variable width vector can we have a way to get length of the data?

For instance, in ArrowColumnVector in StringAccessor we use stringResult.start and stringResult.end, instead we would like to get length of the data through an exposed function.

Now we have getStartOffset in BaseVariableVector and getElementStartIndex/getElementEndIndex in BaseListVector. To be consistent, we add getEndOffset for BaseVariableVector.

@github-actions
Copy link

/**
* Gets the ending offset of a record, given its index.
*/
protected final int getEndOffset(int index) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why protected? I think the intent is to make this public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, because the getStartOffset is protected and I didn't notice that. Now I have made getStartOffset/getEndOffset public.

@emkornfield
Copy link
Contributor

+1 thanks. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants