pitrou commented on code in PR #40971:
URL: https://github.com/apache/arrow/pull/40971#discussion_r1551915778
##########
cpp/src/arrow/compute/kernels/vector_selection_filter_internal.cc:
##########
@@ -924,6 +924,10 @@ Result<std::shared_ptr<RecordBatch>>
FilterRecordBatch(const RecordBatch& batch,
return Status::Invalid("Filter inputs must all be the same length");
}
+ if (filter.is_chunked_array()) {
+ return Status::Invalid("Chunked filter not supported for RecordBatches.");
+ }
Review Comment:
We could instead quite easily implement the solution you initially
implemented in Python, aka create a Table out of the RecordBatch and then call
FilterTable?
After all, it already works for arrays:
```python
>>> a = pa.array([1,2,3,4,5])
>>> f = pa.chunked_array([[True,False],[False,True,True]])
>>> pc.filter(a, f)
<pyarrow.lib.ChunkedArray object at 0x7f91e6960360>
[
[
1
],
[
4,
5
]
]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]