Skip to content

Commit 6f81a57

Browse files
committed
Update conditional order to have lowest cost first
1 parent 3a77e25 commit 6f81a57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

r/R/compute.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ any.ArrowDatum <- function(..., na.rm = FALSE){
192192
a <- collect_arrays_from_dots(list(...))
193193
result <- call_function("any", a)
194194

195-
if(!as.vector(result) && a$null_count > 0 && !na.rm){
195+
if(!na.rm && a$null_count > 0 && !as.vector(result)){
196196
Scalar$create(NA)
197197
} else {
198198
result
@@ -205,7 +205,7 @@ all.ArrowDatum <- function(..., na.rm = FALSE){
205205
a <- collect_arrays_from_dots(list(...))
206206
result <- call_function("all", a)
207207

208-
if(as.vector(result) && a$null_count > 0 && !na.rm){
208+
if(!na.rm && a$null_count > 0 && as.vector(result)){
209209
Scalar$create(NA)
210210
} else {
211211
result

0 commit comments

Comments
 (0)