-
Notifications
You must be signed in to change notification settings - Fork 3.9k
GH-47807: [C++][Compute] Fix the issue that null count is not updated when setting slice on an array span #47808
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
base: main
Are you sure you want to change the base?
Conversation
|
@github-actions crossbow submit -g cpp -g python |
Revision: 2bc7a2a Submitted crossbow builds: ursacomputing/crossbow @ actions-46fae40cf9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, just one suggestion
auto indices = ArrayFromJSON(int64(), "[0, 1, 0, 1, 0, null]"); | ||
auto values1 = ArrayFromJSON(int64(), "[10, 11, 12, 13, 14, 15]"); | ||
auto values2 = ChunkedArrayFromJSON(int64(), {"[100, 101]", "[102, 103, 104, 105]"}); | ||
ASSERT_OK_AND_ASSIGN(auto result, CallFunction("choose", {indices, values1, values2})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also call result.chunked_array()->ValidateFull()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, done.
Thanks!
Rationale for this change
The null count is not updated when setting slice on an array span, after a preceding set slice sees a 0 null count. An incorrectly null count will cause subsequent failures wrt. null processing like #47807.
What changes are included in this PR?
Narrowing the null count update condition when setting slice on an array span: as long as there is a valid buffer, we set null count to unknown.
Are these changes tested?
Test included.
Are there any user-facing changes?
None.
choose
function on chunked input #47807