From 14336544fe4dc973fd365b5c7dc42aba61494a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Mon, 14 Mar 2022 15:01:20 +0000 Subject: [PATCH 01/15] unit tests for `make_date()` --- r/tests/testthat/test-dplyr-funcs-datetime.R | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/r/tests/testthat/test-dplyr-funcs-datetime.R b/r/tests/testthat/test-dplyr-funcs-datetime.R index d0afda8912d..094f058a3e9 100644 --- a/r/tests/testthat/test-dplyr-funcs-datetime.R +++ b/r/tests/testthat/test-dplyr-funcs-datetime.R @@ -974,3 +974,26 @@ test_that("date() errors with unsupported inputs", { regexp = "Unsupported cast from double to date32 using function cast_date32" ) }) + +test_that("make_date", { + set.seed(12345) + test_df <- tibble( + year = sample(1969:2069, 12), + month = 1:12, + day = sample(1:28, 12, replace = TRUE) + ) + + compare_dplyr_binding( + .input %>% + mutate(composed_date = make_date(year, month, day)) %>% + collect(), + test_df + ) + + compare_dplyr_binding( + .input %>% + mutate(cd_r_obj = make_date(1999, 12, 31)) %>% + collect(), + test_df + ) +}) From d878e19a08a4011b96ec6cbc91903d3b8e73b3e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Mon, 14 Mar 2022 15:13:28 +0000 Subject: [PATCH 02/15] unit tests for `make_datetime()` --- r/tests/testthat/test-dplyr-funcs-datetime.R | 30 ++++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/r/tests/testthat/test-dplyr-funcs-datetime.R b/r/tests/testthat/test-dplyr-funcs-datetime.R index 094f058a3e9..cf4c5051ca2 100644 --- a/r/tests/testthat/test-dplyr-funcs-datetime.R +++ b/r/tests/testthat/test-dplyr-funcs-datetime.R @@ -975,12 +975,15 @@ test_that("date() errors with unsupported inputs", { ) }) -test_that("make_date", { +test_that("make_date & make_datetime", { set.seed(12345) test_df <- tibble( year = sample(1969:2069, 12), month = 1:12, - day = sample(1:28, 12, replace = TRUE) + day = sample(1:28, 12, replace = TRUE), + hour = sample(0:23, 12, replace = TRUE), + min = sample(0:59, 12), + sec = sample(0:59, 12) ) compare_dplyr_binding( @@ -992,8 +995,29 @@ test_that("make_date", { compare_dplyr_binding( .input %>% - mutate(cd_r_obj = make_date(1999, 12, 31)) %>% + mutate(composed_date_r_obj = make_date(1999, 12, 31)) %>% collect(), test_df ) + + compare_dplyr_binding( + .input %>% + mutate(composed_datetime = make_datetime(year, month, day, hour, min, sec)) %>% + collect(), + test_df, + # the make_datetime binding uses strptime which does not support tz, hence + # a mismatch in tzone attribute (ARROW-12820) + ignore_attr = TRUE + ) + + compare_dplyr_binding( + .input %>% + mutate( + composed_datetime_r_obj = make_datetime(1999, 12, 31, 14, 15, 16)) %>% + collect(), + test_df, + # the make_datetime binding uses strptime which does not support tz, hence + # a mismatch in tzone attribute (ARROW-12820) + ignore_attr = TRUE + ) }) From f0231c729a2c82c419cc34ea5761ffe513db07d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Mon, 14 Mar 2022 15:13:54 +0000 Subject: [PATCH 03/15] added `make_date()` & `make_datetime()` bindings --- r/R/dplyr-funcs-datetime.R | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index b1ae6a44159..6861cff8f24 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -187,6 +187,27 @@ register_bindings_datetime <- function() { register_binding("date", function(x) { build_expr("cast", x, options = list(to_type = date32())) }) + register_binding("make_date", function(year = 1970L, month = 1L, day = 1L) { + x <- call_binding("paste", year, month, day, sep = "-") + x <- call_binding("strptime", x, format = "%Y-%m-%d", unit = "s") + build_expr("cast", x, options = cast_options(to_type = date32())) + }) + register_binding("make_datetime", function(year = 1970L, + month = 1L, + day = 1L, + hour = 0L, + min = 0L, + sec = 0, + tz = NULL) { + x <- call_binding("paste", year, month, day, hour, min, sec, sep = "-") + # ParseTimestampStrptime currently ignores the timezone information (ARROW-12820). + # Stop if tz is provided. + if (is.character(tz)) { + arrow_not_supported("Time zone argument") + } + + build_expr("strptime", x, options = list(format = "%Y-%m-%d-%H-%M-%S", unit = 0L)) + }) } binding_format_datetime <- function(x, format = "", tz = "", usetz = FALSE) { From d59d30d949f6d500d9fe1a61009c0b46ac9b3a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Mon, 14 Mar 2022 15:20:19 +0000 Subject: [PATCH 04/15] news update --- r/NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/r/NEWS.md b/r/NEWS.md index 43e36a52541..b1f22b5f475 100644 --- a/r/NEWS.md +++ b/r/NEWS.md @@ -22,6 +22,7 @@ * `read_csv_arrow()`'s readr-style type `T` is now mapped to `timestamp(unit = "ns")` instead of `timestamp(unit = "s")`. * `lubridate`: * component extraction functions: `tz()` (timezone), `semester()` (semester), `dst()` (daylight savings time indicator), `date()` (extract date), `epiyear()` (epiyear), improvements to `month()`, which now works with integer inputs. + * `make_date()` and `make_datetime()` * date-time functionality: * `as.Date()` to convert to date From be95aa1967a05796892807e87e8cdfc1d9961bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Mon, 14 Mar 2022 15:28:34 +0000 Subject: [PATCH 05/15] updated NEWS --- r/NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/NEWS.md b/r/NEWS.md index b1f22b5f475..63b50d94f54 100644 --- a/r/NEWS.md +++ b/r/NEWS.md @@ -22,7 +22,7 @@ * `read_csv_arrow()`'s readr-style type `T` is now mapped to `timestamp(unit = "ns")` instead of `timestamp(unit = "s")`. * `lubridate`: * component extraction functions: `tz()` (timezone), `semester()` (semester), `dst()` (daylight savings time indicator), `date()` (extract date), `epiyear()` (epiyear), improvements to `month()`, which now works with integer inputs. - * `make_date()` and `make_datetime()` + * `make_date()` and `make_datetime()` to create `Date` objects from numeric parts. * date-time functionality: * `as.Date()` to convert to date From bc8dcac47a3955d60b6ae5a823e01dde569ed5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Tue, 15 Mar 2022 10:05:37 +0000 Subject: [PATCH 06/15] improve NEWS --- r/NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/NEWS.md b/r/NEWS.md index 63b50d94f54..6b2e0532168 100644 --- a/r/NEWS.md +++ b/r/NEWS.md @@ -22,7 +22,7 @@ * `read_csv_arrow()`'s readr-style type `T` is now mapped to `timestamp(unit = "ns")` instead of `timestamp(unit = "s")`. * `lubridate`: * component extraction functions: `tz()` (timezone), `semester()` (semester), `dst()` (daylight savings time indicator), `date()` (extract date), `epiyear()` (epiyear), improvements to `month()`, which now works with integer inputs. - * `make_date()` and `make_datetime()` to create `Date` objects from numeric parts. + * `make_date()` & `make_datetime()` + `ISOdatetime()` & `ISOdate()` to create date-times from numeric representations. * date-time functionality: * `as.Date()` to convert to date From 0e8dcf5cea1c114c739d45d066d61ff29b1ae676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Tue, 15 Mar 2022 10:09:41 +0000 Subject: [PATCH 07/15] style + `tz = "UTC"` --- r/R/dplyr-funcs-datetime.R | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index 6861cff8f24..d5125a78d7e 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -188,8 +188,7 @@ register_bindings_datetime <- function() { build_expr("cast", x, options = list(to_type = date32())) }) register_binding("make_date", function(year = 1970L, month = 1L, day = 1L) { - x <- call_binding("paste", year, month, day, sep = "-") - x <- call_binding("strptime", x, format = "%Y-%m-%d", unit = "s") + x <- call_binding("make_datetime", year, month, day) build_expr("cast", x, options = cast_options(to_type = date32())) }) register_binding("make_datetime", function(year = 1970L, @@ -198,15 +197,15 @@ register_bindings_datetime <- function() { hour = 0L, min = 0L, sec = 0, - tz = NULL) { - x <- call_binding("paste", year, month, day, hour, min, sec, sep = "-") - # ParseTimestampStrptime currently ignores the timezone information (ARROW-12820). - # Stop if tz is provided. - if (is.character(tz)) { - arrow_not_supported("Time zone argument") - } + tz = "UTC") { + x <- call_binding("paste", year, month, day, hour, min, sec, sep = "-") + # ParseTimestampStrptime currently ignores the timezone information (ARROW-12820). + # Stop if tz is provided. + if (!missing(tz)) { + arrow_not_supported("Time zone argument") + } - build_expr("strptime", x, options = list(format = "%Y-%m-%d-%H-%M-%S", unit = 0L)) + build_expr("strptime", x, options = list(format = "%Y-%m-%d-%H-%M-%S", unit = 0L)) }) } From df5f39015aa7f08a13d9daeaf4f757efd99e94b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Tue, 15 Mar 2022 11:37:57 +0000 Subject: [PATCH 08/15] new test df (without NAs for the time being) --- r/tests/testthat/test-dplyr-funcs-datetime.R | 28 +++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/r/tests/testthat/test-dplyr-funcs-datetime.R b/r/tests/testthat/test-dplyr-funcs-datetime.R index cf4c5051ca2..1a0f6ac4ca1 100644 --- a/r/tests/testthat/test-dplyr-funcs-datetime.R +++ b/r/tests/testthat/test-dplyr-funcs-datetime.R @@ -976,15 +976,25 @@ test_that("date() errors with unsupported inputs", { }) test_that("make_date & make_datetime", { - set.seed(12345) - test_df <- tibble( - year = sample(1969:2069, 12), - month = 1:12, - day = sample(1:28, 12, replace = TRUE), - hour = sample(0:23, 12, replace = TRUE), - min = sample(0:59, 12), - sec = sample(0:59, 12) - ) + # test_df <- expand.grid( + # year = c(1999, 1969, 2069, NA), + # month = c(1, 7, 11, 12, NA), + # day = c(1, 9, 13, 28, NA), + # hour = c(0, 7, 23, NA), + # min = c(0, 59, NA), + # sec = c(0, 59, NA) + # ) %>% + # tibble() + + test_df <- expand.grid( + year = c(1999, 1969, 2069), + month = c(1, 7, 11, 12), + day = c(1, 9, 13, 28), + hour = c(0, 7, 23), + min = c(0, 59), + sec = c(0, 59) + ) %>% + tibble() compare_dplyr_binding( .input %>% From ea94b6775bd66d986994c731cc25183ada342f8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Tue, 15 Mar 2022 11:38:20 +0000 Subject: [PATCH 09/15] updated `tz` abort message --- r/R/dplyr-funcs-datetime.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index d5125a78d7e..9e8cb4e5408 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -200,9 +200,9 @@ register_bindings_datetime <- function() { tz = "UTC") { x <- call_binding("paste", year, month, day, hour, min, sec, sep = "-") # ParseTimestampStrptime currently ignores the timezone information (ARROW-12820). - # Stop if tz is provided. - if (!missing(tz)) { - arrow_not_supported("Time zone argument") + # Stop if tz other than 'UTC' is provided. + if (tz != "UTC") { + arrow_not_supported("Time zone other than 'UTC'") } build_expr("strptime", x, options = list(format = "%Y-%m-%d-%H-%M-%S", unit = 0L)) From b7f60d3a9fe846dacc983d34b7a4dd8f379f5331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Tue, 15 Mar 2022 15:26:10 +0000 Subject: [PATCH 10/15] replaced `paste` with `str_c` which is better at propagating `NA`s --- r/R/dplyr-funcs-datetime.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index 9e8cb4e5408..9e05d920f66 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -198,13 +198,14 @@ register_bindings_datetime <- function() { min = 0L, sec = 0, tz = "UTC") { - x <- call_binding("paste", year, month, day, hour, min, sec, sep = "-") + # ParseTimestampStrptime currently ignores the timezone information (ARROW-12820). # Stop if tz other than 'UTC' is provided. if (tz != "UTC") { arrow_not_supported("Time zone other than 'UTC'") } + x <- call_binding("str_c", year, month, day, hour, min, sec, sep = "-") build_expr("strptime", x, options = list(format = "%Y-%m-%d-%H-%M-%S", unit = 0L)) }) } From 117d0cf2e46ad9c4b985971ce9c7ed9cc9a9bc28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Tue, 15 Mar 2022 15:26:43 +0000 Subject: [PATCH 11/15] update test dataframe --- r/tests/testthat/test-dplyr-funcs-datetime.R | 29 ++++++++------------ 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/r/tests/testthat/test-dplyr-funcs-datetime.R b/r/tests/testthat/test-dplyr-funcs-datetime.R index 1a0f6ac4ca1..232c628bef7 100644 --- a/r/tests/testthat/test-dplyr-funcs-datetime.R +++ b/r/tests/testthat/test-dplyr-funcs-datetime.R @@ -976,26 +976,21 @@ test_that("date() errors with unsupported inputs", { }) test_that("make_date & make_datetime", { - # test_df <- expand.grid( - # year = c(1999, 1969, 2069, NA), - # month = c(1, 7, 11, 12, NA), - # day = c(1, 9, 13, 28, NA), - # hour = c(0, 7, 23, NA), - # min = c(0, 59, NA), - # sec = c(0, 59, NA) - # ) %>% - # tibble() - - test_df <- expand.grid( - year = c(1999, 1969, 2069), - month = c(1, 7, 11, 12), - day = c(1, 9, 13, 28), - hour = c(0, 7, 23), - min = c(0, 59), - sec = c(0, 59) + test_df <- expand.grid( + year = c(1999, 1969, 2069, NA), + month = c(1, 2, 7, 12, NA), + day = c(1, 9, 13, 28, NA), + hour = c(0, 7, 23, NA), + min = c(0, 59, NA), + sec = c(0, 59, NA) ) %>% tibble() + test_df %>% + arrow_table() %>% + mutate(composed_date = make_date(year, month, day)) %>% + collect() + compare_dplyr_binding( .input %>% mutate(composed_date = make_date(year, month, day)) %>% From 5a4ce76dc0fdf9822f9869c640c33ec96d43c8a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Wed, 16 Mar 2022 11:48:31 +0000 Subject: [PATCH 12/15] reorganised --- r/R/dplyr-funcs-datetime.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index 9e05d920f66..108595d3050 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -187,10 +187,6 @@ register_bindings_datetime <- function() { register_binding("date", function(x) { build_expr("cast", x, options = list(to_type = date32())) }) - register_binding("make_date", function(year = 1970L, month = 1L, day = 1L) { - x <- call_binding("make_datetime", year, month, day) - build_expr("cast", x, options = cast_options(to_type = date32())) - }) register_binding("make_datetime", function(year = 1970L, month = 1L, day = 1L, @@ -208,6 +204,10 @@ register_bindings_datetime <- function() { x <- call_binding("str_c", year, month, day, hour, min, sec, sep = "-") build_expr("strptime", x, options = list(format = "%Y-%m-%d-%H-%M-%S", unit = 0L)) }) + register_binding("make_date", function(year = 1970L, month = 1L, day = 1L) { + x <- call_binding("make_datetime", year, month, day) + build_expr("cast", x, options = cast_options(to_type = date32())) + }) } binding_format_datetime <- function(x, format = "", tz = "", usetz = FALSE) { From 7f8d71848629e8b6407a86e4fe9ecc5b6d592d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Wed, 16 Mar 2022 14:33:46 +0000 Subject: [PATCH 13/15] bindings for `ISOdatetime()` & `ISOdate()` + unit tests --- r/R/dplyr-funcs-datetime.R | 24 ++++++++ r/tests/testthat/test-dplyr-funcs-datetime.R | 60 ++++++++++++++++++-- 2 files changed, 79 insertions(+), 5 deletions(-) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index 108595d3050..45e6a641e2d 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -208,6 +208,30 @@ register_bindings_datetime <- function() { x <- call_binding("make_datetime", year, month, day) build_expr("cast", x, options = cast_options(to_type = date32())) }) + register_binding("ISOdatetime", function(year, + month, + day, hour, + min, + sec, + tz = "UTC") { + + # NAs for seconds aren't propagated (but treated as 0) in the base version + sec <- call_binding("if_else", + call_binding("is.na", sec), + 0, + sec) + + call_binding("make_datetime", year, month, day, hour, min, sec) + }) + register_binding("ISOdate", function(year, + month, + day, + hour = 12, + min = 0, + sec = 0, + tz = "UTC") { + call_binding("make_datetime", year, month, day, hour, min, sec) + }) } binding_format_datetime <- function(x, format = "", tz = "", usetz = FALSE) { diff --git a/r/tests/testthat/test-dplyr-funcs-datetime.R b/r/tests/testthat/test-dplyr-funcs-datetime.R index 232c628bef7..62d682a600b 100644 --- a/r/tests/testthat/test-dplyr-funcs-datetime.R +++ b/r/tests/testthat/test-dplyr-funcs-datetime.R @@ -986,11 +986,6 @@ test_that("make_date & make_datetime", { ) %>% tibble() - test_df %>% - arrow_table() %>% - mutate(composed_date = make_date(year, month, day)) %>% - collect() - compare_dplyr_binding( .input %>% mutate(composed_date = make_date(year, month, day)) %>% @@ -1026,3 +1021,58 @@ test_that("make_date & make_datetime", { ignore_attr = TRUE ) }) + +test_that("ISO_datetime & ISOdate", { + test_df <- expand.grid( + year = c(1999, 1969, 2069, NA), + month = c(1, 2, 7, 12, NA), + day = c(1, 9, 13, 28, NA), + hour = c(0, 7, 23, NA), + min = c(0, 59, NA), + sec = c(0, 59, NA) + ) %>% + tibble() + + compare_dplyr_binding( + .input %>% + mutate(composed_date = ISOdate(year, month, day)) %>% + collect(), + test_df, + # the make_datetime binding uses strptime which does not support tz, hence + # a mismatch in tzone attribute (ARROW-12820) + ignore_attr = TRUE + ) + + compare_dplyr_binding( + .input %>% + mutate(composed_date_r_obj = ISOdate(1999, 12, 31)) %>% + collect(), + test_df, + # the make_datetime binding uses strptime which does not support tz, hence + # a mismatch in tzone attribute (ARROW-12820) + ignore_attr = TRUE + ) + + # the default `tz` for base::ISOdatetime is "", but in Arrow it's "UTC" + compare_dplyr_binding( + .input %>% + mutate( + composed_datetime = ISOdatetime(year, month, day, hour, min, sec, tz = "UTC")) %>% + collect(), + test_df, + # the make_datetime binding uses strptime which does not support tz, hence + # a mismatch in tzone attribute (ARROW-12820) + ignore_attr = TRUE + ) + + compare_dplyr_binding( + .input %>% + mutate( + composed_datetime_r_obj = ISOdatetime(1999, 12, 31, 14, 15, 16)) %>% + collect(), + test_df, + # the make_datetime binding uses strptime which does not support tz, hence + # a mismatch in tzone attribute (ARROW-12820) + ignore_attr = TRUE + ) +}) From d09cdeb1879ccd7609b52ece11218be1b30972e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Moldovan-Gr=C3=BCnfeld?= Date: Mon, 21 Mar 2022 10:36:10 +0000 Subject: [PATCH 14/15] passing `tz` --- r/R/dplyr-funcs-datetime.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index 45e6a641e2d..118f92f8e25 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -221,7 +221,7 @@ register_bindings_datetime <- function() { 0, sec) - call_binding("make_datetime", year, month, day, hour, min, sec) + call_binding("make_datetime", year, month, day, hour, min, sec, tz) }) register_binding("ISOdate", function(year, month, @@ -230,7 +230,7 @@ register_bindings_datetime <- function() { min = 0, sec = 0, tz = "UTC") { - call_binding("make_datetime", year, month, day, hour, min, sec) + call_binding("make_datetime", year, month, day, hour, min, sec, tz) }) } From ed1e899b93985202a1ebdc4c313fc303b1df0b1b Mon Sep 17 00:00:00 2001 From: Jonathan Keane Date: Mon, 21 Mar 2022 11:34:35 -0500 Subject: [PATCH 15/15] Update r/R/dplyr-funcs-datetime.R --- r/R/dplyr-funcs-datetime.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index 118f92f8e25..7f8660d74a7 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -210,7 +210,8 @@ register_bindings_datetime <- function() { }) register_binding("ISOdatetime", function(year, month, - day, hour, + day, + hour, min, sec, tz = "UTC") {