cyb70289 commented on a change in pull request #11050:
URL: https://github.com/apache/arrow/pull/11050#discussion_r701532028
##########
File path: cpp/src/arrow/compute/kernels/scalar_cast_numeric.cc
##########
@@ -264,10 +264,8 @@ Status CastIntegerToFloating(KernelContext* ctx, const
ExecBatch& batch, Datum*
struct BooleanToNumber {
template <typename OutValue, typename Arg0Value>
- static OutValue Call(KernelContext*, Arg0Value val, Status*) {
- constexpr auto kOne = static_cast<OutValue>(1);
- constexpr auto kZero = static_cast<OutValue>(0);
- return val ? kOne : kZero;
Review comment:
Looks this original code is easier to read?
--
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]