[
https://issues.apache.org/jira/browse/ARROW-15166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17462712#comment-17462712
]
David Li commented on ARROW-15166:
----------------------------------
[https://github.com/apache/arrow/blob/04641a38ee5da0fa1d745fd29fd4a206719338cd/cpp/src/arrow/compute/kernels/vector_selection.cc#L2368]
should 1) use DECIMAL128 not DECIMAL 2) contain an entry for DECIMAL256
> [C++] Implement an array_filter kernel for decimal256
> -----------------------------------------------------
>
> Key: ARROW-15166
> URL: https://issues.apache.org/jira/browse/ARROW-15166
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Dragoș Moldovan-Grünfeld
> Priority: Major
> Labels: good-first-issue, kernel
>
> This surfaced in some of the R unit tests. I believe the expected behaviour
> would be to return an empty {{chunked array}}. Reproducible example:
> {code:r}
> suppressMessages(library(arrow))
> empty_filter <- ChunkedArray$create(type = bool())
> one_empty_chunk <- ChunkedArray$create(type = decimal128(4, 2))
> one_empty_chunk$Filter(empty_filter)
> #> ChunkedArray
> #> [
> #>
> #> ]
> one_empty_chunk <- ChunkedArray$create(type = decimal256(4, 2))
> one_empty_chunk$Filter(empty_filter)
> #>Error: NotImplemented: Function array_filter has no kernel matching input
> types (array[decimal256(4, 2)], array[bool])
> {code}
> [This
> suite|https://github.com/apache/arrow/blob/04641a38ee5da0fa1d745fd29fd4a206719338cd/r/tests/testthat/test-chunked-array.R#L209-L236]
> of unit tests were introduced as part of ARROW-13761.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)