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


##########
cpp/src/arrow/compute/kernels/scalar_compare.cc:
##########
@@ -445,6 +445,14 @@ std::shared_ptr<ScalarFunction> 
MakeCompareFunction(std::string name, FunctionDo
     DCHECK_OK(func->AddKernel({ty, ty}, boolean(), std::move(exec)));
   }
 
+  if constexpr (std::is_same_v<Op, Equal> || std::is_same_v<Op, NotEqual>) {
+    for (const auto id : {Type::LIST, Type::LARGE_LIST}) {
+      auto exec = GenerateList<applicator::ScalarBinaryEqualTypes, 
BooleanType, Op>(id);

Review Comment:
   > So AFAICT the `RangeDataEqualsImpl` returns a scalar bool value, rather 
than an array of booleans like we would need in the result here.
   
   That's right, so it would need to be called once for each list element 
(which is admittedly non optimal, but probably better than using `GetScalar` 
anyway?).
   
   > That class is also private to the `compare.cc` module and doesn't expose 
any suitable entrypoint in `compare.h` that I think would work here.
   
   Well, we could add a suitable entrypoint in `compare_internal.h` if that's 
useful.
   
   Another possible approach would be to leverage the comparison kernel for the 
child type, but that would probably be even more involved. So that's up to how 
much work you want to put into this :)



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