edponce commented on a change in pull request #10395: URL: https://github.com/apache/arrow/pull/10395#discussion_r656451863
########## File path: cpp/src/arrow/compute/api_scalar.cc ########## @@ -50,6 +50,11 @@ namespace compute { SCALAR_ARITHMETIC_UNARY(AbsoluteValue, "abs", "abs_checked") SCALAR_ARITHMETIC_UNARY(Negate, "negate", "negate_checked") +Result<Datum> Sign(const Datum& arg, SignOptions options, ExecContext* ctx) { + auto func_name = options.with_signed_zero ? "sign_with_signed_zero" : "sign"; Review comment: @pitrou The sign kernel is to be used by the rounding function. I agree with the fact that `sign_with_signed_zero` is equivalent to `copysign`. Actually, `copysign` is the variant needed for rounding function. Nevertheless, `sign` is a common function exposed in frontend tools, so I consider it worthwhile to provide. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org