Skip to content
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

[R] lubridate::as_datetime() in dplyr query should be able to handle time in sub seconds #32694

Closed
asfimport opened this issue Aug 15, 2022 · 1 comment

Comments

@asfimport
Copy link
Collaborator

asfimport commented Aug 15, 2022

Since the current unit is fixed to "s", an error will occur if a time containing sub-seconds is given.

"1970-01-01T00:00:59.123456789" |>
  arrow::arrow_table(x = _) |>
  dplyr::mutate(x = lubridate::as_datetime(x, tz = "UTC")) |>
  dplyr::collect()
#> Error in `dplyr::collect()`:
#> ! Invalid: Failed to parse string: '1970-01-01T00:00:59.123456789' as a scalar of type timestamp[s]

I thought that nanoseconds should be used, but it should be noted that POSIXct is currently supposed to be converted to microseconds, as shown in ARROW-17424.
 
 
 

 

Reporter: SHIMA Tatsuya / @eitsupi
Assignee: SHIMA Tatsuya / @eitsupi

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-17425. Please see the migration documentation for further details.

@raulcd
Copy link
Member

raulcd commented Jan 11, 2023

Thanks for pointing this out @eitsupi I am closing this manually as was merged in the interim of the migration! We have updated the merge scripts to avoid this in the future for happening.

@raulcd raulcd closed this as completed Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants