Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-17425

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 9.0.0
    • 11.0.0
    • R

    Description

      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.
       
       
       

       

      Attachments

        Issue Links

          Activity

            People

              eitsupi SHIMA Tatsuya
              eitsupi SHIMA Tatsuya
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m