Uh oh!
There was an error while loading. Please reload this page.
ARROW-14199 [R] bindings for format (where possible) - #12319
Conversation
TL/DR: ================= I think the failures I am seeing so far are due to the difference between library(dplyr, warn.conflicts=FALSE)
library(lubridate, warn.conflicts=FALSE)
times<- tibble(
datetime= c(lubridate::ymd_hms("2018-10-07 19:04:05", tz="Etc/GMT+6"), NA),
date= c(as.Date("2021-01-01"), NA)
)
formats<-"%a %A %w %d %b %B %m %y %Y %H %I %p %M %z %Z %j %U %W %x %X %% %G %V %u"a<-times$datetime[1]
a#> [1] "2018-10-07 19:04:05 -06"
format(a, format=formats)
#> [1] "Sun Sunday 0 07 Oct October 10 18 2018 19 07 PM 04 -0600 -06 280 40 40 10/07/2018 19:04:05 % 2018 40 7"
strftime(a, format=formats)
#> [1] "Mon Monday 1 08 Oct October 10 18 2018 02 02 AM 04 +0100 BST 281 40 41 10/08/2018 02:04:05 % 2018 41 1"Created on 2022-02-02 by the reprex package (v2.0.1) The difference boils down to: # format()
format(as.POSIXlt(a), format=formats)
#> [1] "Sun Sunday 0 07 Oct October 10 18 2018 19 07 PM 04 -0600 -06 280 40 40 10/07/2018 19:04:05 % 2018 40 7"# strftime()
format(as.POSIXlt(a, tz=""), format=formats)
#> [1] "Mon Monday 1 08 Oct October 10 18 2018 02 02 AM 04 +0100 BST 281 40 41 10/08/2018 02:04:05 % 2018 41 1"Created on 2022-02-02 by the reprex package (v2.0.1) |
jonkeane
left a comment
There was a problem hiding this comment.
Thanks for this! a few comments / suggestions at a high level
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
paleolimbot
left a comment
There was a problem hiding this comment.
The datetime bits are looking good! I added a few comments that may help to handle other types of objects that might get passed to format().
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
dragosmg
commented
Feb 23, 2022
Follow-up ticket to remove / revisit the manual casting step - ARROW-15762. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
dragosmg
commented
Mar 3, 2022
@jonkeane I think this is ready for another pass if/when you have a bit of time |
jonkeane
left a comment
There was a problem hiding this comment.
This is looking good — one super minor test addition and a question about build_expr() + clauses catching non-expressions
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jonkeane
left a comment
There was a problem hiding this comment.
Almost there! One comment about a comment + a question about the tests
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…t()` for regular R objects
jonkeane
left a comment
There was a problem hiding this comment.
This is great, thanks for sticking through this.
Benchmark runs are scheduled for baseline = 33fd1c2 and contender = dc2e0b2. dc2e0b2 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
No description provided.