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 15:14:17 UTC

[GitHub] [arrow] nealrichardson commented on a change in pull request #10237: ARROW-12571: [R][CI] Run nightly R with valgrind

nealrichardson commented on a change in pull request #10237:
URL: https://github.com/apache/arrow/pull/10237#discussion_r625870268



##########
File path: r/tests/testthat/test-compute-aggregate.R
##########
@@ -37,7 +37,8 @@ test_that("sum.Array", {
 
   floats <- c(floats, NA)
   na <- Array$create(floats)
-  expect_identical(as.numeric(sum(na)), sum(floats))
+  # expect_identical(as.numeric(sum(na)), sum(floats))
+  expect_identical(as.numeric(sum(na)), NA_real_)

Review comment:
       Could also do something like (of course confirming the right way to determine a devel version). Could also add the devel check to the `skip_on_linux_cran` (and call it `skip_on_valgrind()`) if you wanted to make that narrower. 
   
   ```suggestion
     if (!grepl("devel", R.version.string)) {
       # Valgrind on R-devel confuses NaN and NA_real_
       expect_identical(as.numeric(sum(na)), sum(floats))
     }
   ```




-- 
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