jonkeane commented on a change in pull request #11292:
URL: https://github.com/apache/arrow/pull/11292#discussion_r720384938
##########
File path: r/tests/testthat/helper-data.R
##########
@@ -168,3 +168,24 @@ example_data_for_sorting <- tibble::tibble(
)),
grp = c(rep("A", 5), rep("B", 5))
)
+
+# For Dataset tests
+first_date <- lubridate::ymd_hms("2015-04-29 03:12:39")
+df1 <- tibble::tibble(
+ int = 1:10,
+ dbl = as.numeric(1:10),
+ lgl = rep(c(TRUE, FALSE, NA, TRUE, FALSE), 2),
+ chr = letters[1:10],
+ fct = factor(LETTERS[1:10]),
+ ts = first_date + lubridate::days(1:10)
+)
+
+second_date <- lubridate::ymd_hms("2017-03-09 07:01:02")
+df2 <- tibble::tibble(
+ int = 101:110,
+ dbl = c(as.numeric(51:59), NaN),
+ lgl = rep(c(TRUE, FALSE, NA, TRUE, FALSE), 2),
+ chr = letters[10:1],
+ fct = factor(LETTERS[10:1]),
+ ts = second_date + lubridate::days(10:1)
+)
Review comment:
🙏 having the data in helpers is so nice for iterative testing (since
`devtools::load_all()` loads all of that as well). It's a balancing act of "we
use this enough to put it in another file" versus "this specific data is needed
for this specific test and that's it"), but I appreciate moving more of these
to helpers.
--
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]