You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/05/04 20:27:56 UTC
[GitHub] [arrow] edponce commented on a change in pull request #10196: ARROW-12575: [R] Use unary negative kernel
edponce commented on a change in pull request #10196:
URL: https://github.com/apache/arrow/pull/10196#discussion_r626084087
##########
File path: r/R/expression.R
##########
@@ -56,13 +56,9 @@ build_array_expression <- function(FUN,
args = list(...),
options = empty_named_list()) {
if (FUN == "-" && length(args) == 1L) {
- # Unary -, i.e. just make it negative, and somehow this works
if (inherits(args[[1]], c("ArrowObject", "array_expression"))) {
- # Make it be 0 - arg
- # TODO(ARROW-11950): do this in C++ compute
- args <- list(0L, args[[1]])
+ return(build_array_expression("negate", args[[1]]))
Review comment:
I just noticed that we should update the *negate_checked_doc* to state explicitly that it does not support unsigned arguments. We do show this in the function signature table https://github.com/apache/arrow/blob/master/docs/source/cpp/compute.rst#arithmetic-functions
--
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:
users@infra.apache.org