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-6174: [C++] Validate chunks in ChunkedArray::Validate. Fix validation of sliced ListArray, values null checks #5148

Closed
wants to merge 1 commit into from

Conversation

wesm
Copy link
Member

@wesm wesm commented Aug 21, 2019

  • Validate for ListArray was checking the length of the values buffer against the last offset. When we call Array::Slice, the child values buffer actually is not modified (maybe it should be?) so this invariant is broken. The main thing that matters is that the values buffer is at least as large as the last offset.
  • Changes validation checks to only assert that values buffer (buffer index 1) is non-null when the length is non-zero. I know that the null values buffer is a controversial topic, but we have code throughout that handles this case so I don't know that we can surely say that such arrays are invalid

Otherwise I think that validating chunks in ChunkedArray::Validate is a good idea.

@wesm wesm requested a review from pitrou August 21, 2019 03:16
Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

+1 from me.

@pitrou
Copy link
Member

pitrou commented Aug 21, 2019

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