pitrou commented on code in PR #38075:
URL: https://github.com/apache/arrow/pull/38075#discussion_r1350407428


##########
python/pyarrow/tests/test_table.py:
##########
@@ -2302,6 +2302,9 @@ def test_table_filter_expression():
         "colVals": ["a", "b", "f", "B", "A"]
     })
 
+    with pytest.raises(NotImplementedError):
+        result = t1.filter(t2)

Review Comment:
   The tests need not depend on Acero, perhaps it should be added to 
`test_compute.py` instead?



##########
cpp/src/arrow/compute/kernels/vector_selection_filter_internal.cc:
##########
@@ -998,6 +998,11 @@ class FilterMetaFunction : public MetaFunction {
   Result<Datum> ExecuteImpl(const std::vector<Datum>& args,
                             const FunctionOptions* options,
                             ExecContext* ctx) const override {
+    if ((args[1].kind() != Datum::ARRAY) &&
+        (args[1].kind() != Datum::CHUNKED_ARRAY)) {
+        return Status::NotImplemented("Filter should be array-like");

Review Comment:
   Can we make this `TypeError`?



-- 
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]

Reply via email to