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/01/11 20:27:09 UTC

[GitHub] [arrow] jonkeane opened a new pull request #9167: ARROW-11136: [R] Bindings for is.nan

jonkeane opened a new pull request #9167:
URL: https://github.com/apache/arrow/pull/9167


   


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



[GitHub] [arrow] github-actions[bot] commented on pull request #9167: ARROW-11136: [R] Bindings for is.nan

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9167:
URL: https://github.com/apache/arrow/pull/9167#issuecomment-758276517


   https://issues.apache.org/jira/browse/ARROW-11136


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



[GitHub] [arrow] jonkeane commented on a change in pull request #9167: ARROW-11136: [R] Bindings for is.nan

Posted by GitBox <gi...@apache.org>.
jonkeane commented on a change in pull request #9167:
URL: https://github.com/apache/arrow/pull/9167#discussion_r555349558



##########
File path: r/R/expression.R
##########
@@ -111,7 +111,8 @@ cast_array_expression <- function(x, to_type, safe = TRUE, ...) {
 
 .unary_function_map <- list(
   "!" = "invert",
-  "is.na" = "is_null"
+  "is.na" = "is_null",
+  "is.nan" = "is_nan"

Review comment:
       Yeah, absolutely! There's more testing in this PR than operational code :) 




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



[GitHub] [arrow] nealrichardson closed pull request #9167: ARROW-11136: [R] Bindings for is.nan

Posted by GitBox <gi...@apache.org>.
nealrichardson closed pull request #9167:
URL: https://github.com/apache/arrow/pull/9167


   


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



[GitHub] [arrow] nealrichardson commented on a change in pull request #9167: ARROW-11136: [R] Bindings for is.nan

Posted by GitBox <gi...@apache.org>.
nealrichardson commented on a change in pull request #9167:
URL: https://github.com/apache/arrow/pull/9167#discussion_r555347689



##########
File path: r/tests/testthat/test-dataset.R
##########
@@ -417,6 +417,17 @@ test_that("filter() with is.na()", {
   )
 })
 
+test_that("filter() with is.na()", {
+  ds <- open_dataset(dataset_dir, partitioning = schema(part = uint8()))
+  expect_equivalent(
+    ds %>%
+      select(part, dbl) %>%
+      filter(!is.nan(dbl), part == 1) %>%

Review comment:
       I'm not sure this is a great test because the NaN you added looks like it is in `part == 2`

##########
File path: r/tests/testthat/test-dataset.R
##########
@@ -417,6 +417,17 @@ test_that("filter() with is.na()", {
   )
 })
 
+test_that("filter() with is.na()", {

Review comment:
       ```suggestion
   test_that("filter() with is.nan()", {
   ```

##########
File path: r/R/expression.R
##########
@@ -111,7 +111,8 @@ cast_array_expression <- function(x, to_type, safe = TRUE, ...) {
 
 .unary_function_map <- list(
   "!" = "invert",
-  "is.na" = "is_null"
+  "is.na" = "is_null",
+  "is.nan" = "is_nan"

Review comment:
       It's beautiful that this is the only change needed to support this in the dplyr code.




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