You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Alvin Chunga Mamani (Jira)" <ji...@apache.org> on 2021/11/22 19:42:00 UTC
[jira] [Comment Edited] (ARROW-9430) [C++/Python] Kernel for SetItem(BooleanArray, values)
[ https://issues.apache.org/jira/browse/ARROW-9430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17447588#comment-17447588 ]
Alvin Chunga Mamani edited comment on ARROW-9430 at 11/22/21, 7:41 PM:
-----------------------------------------------------------------------
Hi [~lidavidm], 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*
{code:java}
this->Assert(ReplaceWithMask, this->array("[1, null, 1]"),
this->mask("[false, true, false]"),
this->array("[7]"),
this->array("[1, 7, 1]"));{code}
The result is:
{code:java}
Actual:
[
1,
null,
1
]{code}
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-14-40-02-692.png!
This is and expected behavior or an issue on *{{ReplaceWithArrayMask}}* ?
was (Author: JIRAUSER280323):
Hi [~lidavidm], 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-14-40-02-692.png!
This is and expected behavior or an issue on {{ReplaceWithArrayMask}} ?
> [C++/Python] Kernel for SetItem(BooleanArray, values)
> -----------------------------------------------------
>
> Key: ARROW-9430
> URL: https://issues.apache.org/jira/browse/ARROW-9430
> Project: Apache Arrow
> Issue Type: New Feature
> Components: C++, Python
> Reporter: Uwe Korn
> Assignee: David Li
> Priority: Major
> Labels: pull-request-available
> Fix For: 5.0.0
>
> Attachments: image-2021-11-22-14-40-02-692.png
>
> Time Spent: 10h 10m
> Remaining Estimate: 0h
>
> We should have a kernel that allows overriding the values of an array by supplying a boolean mask and a scalar or an array of equal length.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)