You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Jin Shang (Jira)" <ji...@apache.org> on 2022/11/01 14:21:00 UTC

[jira] [Assigned] (ARROW-18185) [C++][Compute] Support KEEP_NULL option for compute::Filter

     [ https://issues.apache.org/jira/browse/ARROW-18185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jin Shang reassigned ARROW-18185:
---------------------------------

    Assignee: Jin Shang

> [C++][Compute] Support KEEP_NULL option for compute::Filter
> -----------------------------------------------------------
>
>                 Key: ARROW-18185
>                 URL: https://issues.apache.org/jira/browse/ARROW-18185
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++
>            Reporter: Jin Shang
>            Assignee: Jin Shang
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> The current Filter implementation always drops the filtered values. In some use cases, it's desirable for the output array to have the same size as the inut array. So I added a new option FilterOptions::KEEP_NULL where the filtered values are kept as nulls.
> For example, with input [1, 2, 3] and filter [true, false, true], the current implementation will output [1, 3] and with the new option it will output [1, null, 3]
> This option is simpler to implement since we only need to construct a new validity bitmap and reuse the input buffers and child arrays. Except for dense union arrays which don't have validity bitmaps.
> It is also faster to filter with FilterOptions::KEEP_NULL according to the benchmark result in most cases. So users can choose this option for better performance when dropping filtered values is not required.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)