Skip to content

ARROW-16394: [R] Implement lubridate's parsers with year, month and date components - #13118

Closed
dragosmg wants to merge 6 commits into
apache:masterfrom
dragosmg:ymd_parsers
Closed

ARROW-16394: [R] Implement lubridate's parsers with year, month and date components#13118
dragosmg wants to merge 6 commits into
apache:masterfrom
dragosmg:ymd_parsers

Conversation

@dragosmg

@dragosmgdragosmg commented May 11, 2022

Copy link
Copy Markdown
Contributor

This PR adds bindings for lubridate's parsers with year, month, and day components, allowing the following to work correctly:

library(dplyr, warn.conflicts=FALSE)
library(arrow, warn.conflicts=FALSE)
library(lubridate, warn.conflicts=FALSE)
test_df<-tibble::tibble(
ymd_string= c("2022-05-11", "2022/05/12", "22.05-13")
)
test_df %>% mutate(ymd_date= ymd(ymd_string))
#> # A tibble: 3 × 2#> ymd_string ymd_date #> <chr> <date> #> 1 2022-05-11 2022-05-11#> 2 2022/05/12 2022-05-12#> 3 22.05-13 2022-05-13test_df %>% arrow_table() %>% mutate(ymd_date= ymd(ymd_string)) %>%
collect()
#> # A tibble: 3 × 2#> ymd_string ymd_date #> <chr> <date> #> 1 2022-05-11 2022-05-11#> 2 2022/05/12 2022-05-12#> 3 22.05-13 2022-05-13

Created on 2022-05-11 by the reprex package (v2.0.1)

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@dragosmg
dragosmg marked this pull request as ready for review May 11, 2022 09:42
@thisisnic
thisisnic self-requested a review May 11, 2022 09:49

@thisisnicthisisnic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few suggestions - looks almost good to go though.

Comment threadr/R/dplyr-funcs-datetime.R
Comment threadr/R/dplyr-funcs-datetime.R
Comment threadr/R/dplyr-funcs-datetime.R
Comment threadr/tests/testthat/test-dplyr-funcs-datetime.R Outdated

@thisisnicthisisnic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the remaining comments are addressed, this is good to go!

@dragosmg
dragosmg deleted the ymd_parsers branch May 12, 2022 14:57
@ursabot

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = e5e4901 and contender = 90aac16. 90aac16 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.31% ⬆️0.04%] test-mac-arm
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.47% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 90aac167 ec2-t3-xlarge-us-east-2
[Finished] 90aac167 test-mac-arm
[Finished] 90aac167 ursa-i9-9960x
[Finished] 90aac167 ursa-thinkcentre-m75q
[Finished] e5e4901e ec2-t3-xlarge-us-east-2
[Finished] e5e4901e test-mac-arm
[Finished] e5e4901e ursa-i9-9960x
[Finished] e5e4901e ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

kou pushed a commit that referenced this pull request Feb 20, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@dragosmg@ursabot@thisisnic