Copilot commented on code in PR #49964:
URL: https://github.com/apache/arrow/pull/49964#discussion_r3278284523
##########
cpp/src/arrow/compute/kernels/scalar_compare.cc:
##########
@@ -433,6 +433,12 @@ std::shared_ptr<ScalarFunction>
MakeCompareFunction(std::string name, FunctionDo
GenerateVarBinaryBase<applicator::ScalarBinaryEqualTypes, BooleanType,
Op>(*ty);
DCHECK_OK(func->AddKernel({ty, ty}, boolean(), std::move(exec)));
}
+ for (const std::shared_ptr<DataType>& ty : {binary_view(), utf8_view()}) {
+ auto exec =
+ GenerateVarBinaryViewBase<applicator::ScalarBinaryEqualTypes,
BooleanType, Op>(
+ *ty);
+ DCHECK_OK(func->AddKernel({ty, ty}, boolean(), std::move(exec)));
+ }
Review Comment:
Consider iterating over `BinaryViewTypes()` here (as done in other kernel
registration code) instead of hardcoding `{binary_view(), utf8_view()}`. That
avoids missing registration if additional binary-view-like types are added
later and keeps registration patterns consistent across kernels (e.g.,
scalar_cast_boolean.cc uses `BinaryViewTypes()`).
--
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]