Repository navigation
GH-36949: [C++] Fix KeyColumnArray's buffers array bounds assertion. - #36966
Merged
Merged
Conversation
The length of the buffers array is 3 (kMaxBuffers). - buffers_[kValidityBuffer] - buffers_[kFixedLengthBuffer] - buffers_[kVariableLengthBuffer] So when we do the check, the asserted index should be less than 3, not equal to. In addition, fix the comment line break format problem.
|
|
pitrou
approved these changes
Aug 10, 2023
pitrou
left a comment
Member
There was a problem hiding this comment.
Well spotted, thank you @Light-City
|
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 27949b4. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
loicalleyne
pushed a commit
to loicalleyne/arrow
that referenced
this pull request
Nov 13, 2023
…tion. (apache#36966) ### Rationale for this change file: light_array.h The length of the buffers array is 3 (kMaxBuffers). - buffers_[kValidityBuffer] - buffers_[kFixedLengthBuffer] - buffers_[kVariableLengthBuffer] So when we do the check, the asserted index should be less than 3, not equal to. In addition, fix the comment line break format problem. ### What changes are included in this PR? - KeyColumnArray data and mutable_data ARROW_DCHECK. - ResizableArrayData class Comment line break formatting for mutable_data functions ### Are these changes tested? no, just change assert bound. ### Are there any user-facing changes? no * Closes: apache#36949 Authored-by: light-city <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
file: light_array.h
The length of the buffers array is 3 (kMaxBuffers).
So when we do the check, the asserted index should be less than 3, not equal to.
In addition, fix the comment line break format problem.
What changes are included in this PR?
data and mutable_data ARROW_DCHECK.
Comment line break formatting for mutable_data functions
Are these changes tested?
no, just change assert bound.
Are there any user-facing changes?
no