-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-17252: [R] Intermittent valgrind failure #13773
Changes from 7 commits
73e68de
3647aa3
46d7ef3
f9f9e85
10a9815
3b71868
2efade7
37e6e2e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -81,6 +81,9 @@ test_that("arrow_scalar_function() works with auto_convert = TRUE", { | |||||
|
||||||
test_that("register_scalar_function() adds a compute function to the registry", { | ||||||
skip_if_not(CanRunWithCapturedR()) | ||||||
# TODO(ARROW-17178): User-defined function-friendly ExecPlan execution has | ||||||
# occasional valgrind errors | ||||||
skip_on_linux_devel() | ||||||
|
||||||
register_scalar_function( | ||||||
"times_32", | ||||||
|
@@ -109,6 +112,8 @@ test_that("register_scalar_function() adds a compute function to the registry", | |||||
dplyr::collect(), | ||||||
tibble::tibble(a = 1L, b = 32.0) | ||||||
) | ||||||
|
||||||
Sys.unsetenv("R_ARROW_COLLECT_WITH_UDF") | ||||||
}) | ||||||
|
||||||
test_that("arrow_scalar_function() with bad return type errors", { | ||||||
|
@@ -143,6 +148,9 @@ test_that("arrow_scalar_function() with bad return type errors", { | |||||
call_function("times_32_bad_return_type_scalar", Array$create(1L)), | ||||||
"Expected return Array or Scalar with type 'double'" | ||||||
) | ||||||
|
||||||
# TODO(ARROW-17178) remove the need for this! | ||||||
Sys.unsetenv("R_ARROW_COLLECT_WITH_UDF") | ||||||
}) | ||||||
|
||||||
test_that("register_user_defined_function() can register multiple kernels", { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also below There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed! |
||||||
|
@@ -203,12 +211,18 @@ test_that("register_user_defined_function() errors for unsupported specification | |||||
), | ||||||
"Kernels for user-defined function must accept the same number of arguments" | ||||||
) | ||||||
|
||||||
# TODO(ARROW-17178) remove the need for this! | ||||||
Sys.unsetenv("R_ARROW_COLLECT_WITH_UDF") | ||||||
}) | ||||||
|
||||||
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 | ||||||
# Skip on linux devel because: | ||||||
# TODO(ARROW-17283): Snappy has a UBSan issue that is fixed in the dev version | ||||||
# TODO(ARROW-17178): User-defined function-friendly ExecPlan execution has | ||||||
# occasional valgrind errors | ||||||
skip_on_linux_devel() | ||||||
|
||||||
n_rows <- 10000 | ||||||
|
@@ -255,6 +269,9 @@ test_that("user-defined functions work during multi-threaded execution", { | |||||
dplyr::collect() | ||||||
|
||||||
expect_identical(result2$fun_result, example_df$value * 32) | ||||||
|
||||||
# TODO(ARROW-17178) remove the need for this! | ||||||
Sys.unsetenv("R_ARROW_COLLECT_WITH_UDF") | ||||||
}) | ||||||
|
||||||
test_that("user-defined error when called from an unsupported context", { | ||||||
|
@@ -304,4 +321,7 @@ test_that("user-defined error when called from an unsupported context", { | |||||
"Call to R \\(.*?\\) from a non-R thread from an unsupported context" | ||||||
) | ||||||
} | ||||||
|
||||||
# TODO(ARROW-17178) remove the need for this! | ||||||
Sys.unsetenv("R_ARROW_COLLECT_WITH_UDF") | ||||||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NBD but should this more properly go inside of
on.exit
above? likeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!