You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "thisisnic (via GitHub)" <gi...@apache.org> on 2026/03/17 10:51:59 UTC

[PR] GH-49533: [R] Implement dplyr's when_any() and when_all() helpers [arrow]

thisisnic opened a new pull request, #49535:
URL: https://github.com/apache/arrow/pull/49535

   ### Rationale for this change
   
   Bindings to new dplyr helpers
   
   ### What changes are included in this PR?
   
   Bindings and tests
   
   ### Are these changes tested?
   
   Yes
   
   ### Are there any user-facing changes?
   
   Yes
   
   ### AI usage
   
   I have written this using Claude Opus 4.5 using Claude from the cli.  I need to give it another look over before marking ready for review, but have given it an initial review and made some changes.


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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49533: [R] Implement dplyr's when_any() and when_all() helpers [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on PR #49535:
URL: https://github.com/apache/arrow/pull/49535#issuecomment-4133733816

   @jonkeane - mind giving this a look over if you have the time?


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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49533: [R] Implement dplyr's when_any() and when_all() helpers [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on code in PR #49535:
URL: https://github.com/apache/arrow/pull/49535#discussion_r3001236181


##########
r/tests/testthat/test-dplyr-funcs-conditional.R:
##########
@@ -517,3 +517,85 @@ test_that("external objects are found when they're not in the global environment
     tibble(x = c("a", "b"), x2 = c("foo", NA))
   )
 })
+
+test_that("when_any()", {
+  # combines with OR (3 inputs)
+  compare_dplyr_binding(
+    .input |>
+      mutate(result = when_any(lgl, false, int > 5)) |>
+      collect(),
+    tbl
+  )
+
+  # na_rm=TRUE treats NA as FALSE
+  compare_dplyr_binding(
+    .input |>
+      mutate(result = when_any(lgl, false, na_rm = TRUE)) |>
+      collect(),
+    tbl
+  )

Review Comment:
   Yep!



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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49533: [R] Implement dplyr's when_any() and when_all() helpers [arrow]

Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on code in PR #49535:
URL: https://github.com/apache/arrow/pull/49535#discussion_r2996242694


##########
r/tests/testthat/test-dplyr-funcs-conditional.R:
##########
@@ -517,3 +517,85 @@ test_that("external objects are found when they're not in the global environment
     tibble(x = c("a", "b"), x2 = c("foo", NA))
   )
 })
+
+test_that("when_any()", {
+  # combines with OR (3 inputs)
+  compare_dplyr_binding(
+    .input |>
+      mutate(result = when_any(lgl, false, int > 5)) |>
+      collect(),
+    tbl
+  )
+
+  # na_rm=TRUE treats NA as FALSE
+  compare_dplyr_binding(
+    .input |>
+      mutate(result = when_any(lgl, false, na_rm = TRUE)) |>
+      collect(),
+    tbl
+  )

Review Comment:
   I assume that `lgl` here has `NA`s and that's what is being tested here, right?



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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49533: [R] Implement dplyr's when_any() and when_all() helpers [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #49535:
URL: https://github.com/apache/arrow/pull/49535#issuecomment-4145562281

   After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 4bcab1256c43bfa08b0049b76e310bdc0b255931.
   
   There was 1 benchmark result with an error:
   
   - Commit Run on `amd64-m5-4xlarge-linux` at [2026-03-27 17:05:06Z](https://conbench.arrow-dev.org/compare/runs/49abd842ddde4e66bbce7457e591829f...d5f09ce4970447f3923a9884239b0d4c/)
     - [`file-read` (Python) with compression=lz4, dataset=nyctaxi_2010-01, file_type=feather, output_type=table](https://conbench.arrow-dev.org/benchmark-results/069c6c571100725280001e22387d9541)
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/68958347844) has more details.


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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49533: [R] Implement dplyr's when_any() and when_all() helpers [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic merged PR #49535:
URL: https://github.com/apache/arrow/pull/49535


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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org