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-7254: [Java] BaseVariableWidthVector#setSafe appears to make value offsets inconsistent #5898

Closed
wants to merge 1 commit into from

Conversation

liyafan82
Copy link
Contributor

See the discussion in ARROW-7254

@github-actions
Copy link

Copy link
Contributor

@emkornfield emkornfield left a comment

Choose a reason for hiding this comment

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

It setvaluecount happens after set(abcd) is this fix still needed

@emkornfield
Copy link
Contributor

OK, see comment on JIRA, I'm a little bit mixed on if we should patch this change as the pattern goes against what the documented usage should be. That being said, since this is non-obvious it might be better to fix to avoid others getting mixed up with this as well.

@liyafan82
Copy link
Contributor Author

OK, see comment on JIRA, I'm a little bit mixed on if we should patch this change as the pattern goes against what the documented usage should be. That being said, since this is non-obvious it might be better to fix to avoid others getting mixed up with this as well.

There is no problem if we call setValueCount after manipulating the vector, as the setValueCount will call fillHoles, which brings the vector to a consistent state.

Strictly speaking, this is not consistent with the patten of the life cycle of a vector. This problem only exists for VariableWidthVectors.

@fsaintjacques fsaintjacques changed the title ARROW-7254: BaseVariableWidthVector#setSafe appears to make value offsets inconsistent ARROW-7254: [Java] BaseVariableWidthVector#setSafe appears to make value offsets inconsistent Nov 26, 2019
@lidavidm
Copy link
Member

Thank you @liyafan82 for investigating this!

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

3 participants