nealrichardson commented on code in PR #13773:
URL: https://github.com/apache/arrow/pull/13773#discussion_r935603675
##########
r/tests/testthat/test-compute.R:
##########
@@ -237,24 +242,26 @@ test_that("user-defined functions work during
multi-threaded execution", {
)
on.exit(unregister_binding("times_32", update_cache = TRUE))
- # check a regular collect()
- result <- open_dataset(tf_dataset) %>%
- dplyr::mutate(fun_result = times_32(value)) %>%
- dplyr::collect() %>%
- dplyr::arrange(row_num)
+ withr::with_envvar(list(R_ARROW_COLLECT_WITH_UDF = "true"), {
Review Comment:
You should be able to remove this now
##########
r/tests/testthat/test-compute.R:
##########
@@ -103,12 +105,14 @@ test_that("register_scalar_function() adds a compute
function to the registry",
Scalar$create(32L, float64())
)
- expect_identical(
- record_batch(a = 1L) %>%
- dplyr::mutate(b = times_32(a)) %>%
- dplyr::collect(),
- tibble::tibble(a = 1L, b = 32.0)
- )
+ withr::with_envvar(list(R_ARROW_COLLECT_WITH_UDF = "true"), {
Review Comment:
Can revert this
##########
r/tests/testthat/test-compute.R:
##########
@@ -209,6 +213,7 @@ test_that("user-defined functions work during
multi-threaded execution", {
skip_if_not(CanRunWithCapturedR())
skip_if_not_available("dataset")
# Snappy has a UBSan issue: https://github.com/google/snappy/pull/148
+ # TODO(ARROW-17178): remove when user-defined function execution is
stabilized
Review Comment:
Note that the skip is for snappy ubsan too, so both need to be resolved
before we can unskip
##########
r/R/compute.R:
##########
@@ -344,7 +344,7 @@ cast_options <- function(safe = TRUE, ...) {
#' @return `NULL`, invisibly
#' @export
#'
-#' @examplesIf arrow_with_dataset()
+#' @examplesIf arrow_with_dataset() &&
identical(Sys.getenv("R_ARROW_COLLECT_WITH_UDF"), "true")
Review Comment:
Can revert this
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]