[ https://issues.apache.org/jira/browse/ARROW-17414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17580063#comment-17580063 ]
SHIMA Tatsuya commented on ARROW-17414: --------------------------------------- Thank you for pointing out how to call the compute functions. Ideally, it would be great if we could add the with_tz function and update the error messages? > [R]: Lack of `assume_timezone` binding > -------------------------------------- > > Key: ARROW-17414 > URL: https://issues.apache.org/jira/browse/ARROW-17414 > Project: Apache Arrow > Issue Type: Improvement > Components: R > Affects Versions: 9.0.0 > Reporter: SHIMA Tatsuya > Priority: Major > > If we run the following code in R, we will get a C++ derived error message > telling us to use {{assume_timezone}}. > However, this error message is not helpful because there is no binding for > the {{assume_timezone}} function in R. > {code:r} > tf <- tempfile() > writeLines("2004-04-01 12:00", tf) > arrow::read_csv_arrow(tf, schema = arrow::schema(col1 = arrow::timestamp("s", > "UTC"))) > #> Error: > #> ! Invalid: In CSV column #0: CSV conversion error to timestamp[s, tz=UTC]: > expected a zone offset in '2004-04-01 12:00'. If these timestamps are in > local time, parse them as timestamps without timezone, then call > assume_timezone. > #> ℹ If you have supplied a schema and your data contains a header row, you > should supply the argument `skip = 1` to prevent the header being read in as > data. > {code} > It would be useful to improve the error message or to allow > {{assume_timezone}} to be used from R as well. > (although {{lubridate::with_tz()}} and {{lubridate::force_tz()}} could be > more useful within a dplyr query) -- This message was sent by Atlassian Jira (v8.20.10#820010)