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

[C++] Replace With Mask not correctly replacing nulls #30330

Closed
asfimport opened this issue Nov 22, 2021 · 2 comments
Closed

[C++] Replace With Mask not correctly replacing nulls #30330

asfimport opened this issue Nov 22, 2021 · 2 comments

Comments

@asfimport
Copy link
Collaborator

I'm working in ARROW-1699 and using the method ReplaceWithArrayMask for replace the nulls using a generated mask, but the method gave me unexpected results when the input Array contains nulls and this nulls are replaced with values.
When testing this special Test on vector_test_replace_test.cc

this->Assert(ReplaceWithMask, this->array("[1, null, 1]"),
   this->mask("[false, true, false]"),
   this->array("[7]"),
   this->array("[1, 7, 1]"));

The result is:

Actual:
[
1,
null,
1
]

And  debugging the code, the output values is correct, but the null_bitmap isn't updated and keep the original null_bitmap
In the file vector_replace.cc  on line 202, the bitmap is updated only for turnoff the null replacement values
image-2021-11-22-15-51-30-120.png
This is and expected behavior or an issue on ReplaceWithArrayMask ? 

Reporter: Alvin Chunga Mamani / @AlvinJ15
Assignee: Alvin Chunga Mamani / @AlvinJ15

Original Issue Attachments:

PRs and other links:

Note: This issue was originally created as ARROW-14795. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

David Li / @lidavidm:
Thanks for filing this. As commented on ARROW-9430 this is a bug and should be fixed.

@asfimport
Copy link
Collaborator Author

David Li / @lidavidm:
Issue resolved by pull request 11759
#11759

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

No branches or pull requests

1 participant