pitrou commented on a change in pull request #10395:
URL: https://github.com/apache/arrow/pull/10395#discussion_r656045319
##########
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:
Note that we could expose a `copysign` instead of
`sign_with_signed_zero`, which would be more generic.
(`sign_with_signed_zero(x)` would simply be `copysign(x, 1)`, AFAICT)
--
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:
[email protected]