dragosmg commented on pull request #12357:
URL: https://github.com/apache/arrow/pull/12357#issuecomment-1034722439
To add to the conversation above. I think the right way to go is to extract
timezone from the timestamp metadata and not look at each individual value.
However, that could in a situation where a value is NA, but the column is a
`timestamp` which will result in something like:
``` r
suppressMessages(library(arrow))
suppressMessages(library(dplyr))
df <- tibble(
x = as.POSIXct(c("2022-02-07", NA), tz = "Pacific/Marquesas")
)
df %>%
record_batch() %>%
mutate(timezone_x = tz(x)) %>%
collect()
#> A tibble: 2 × 2
#> x timezone_x
#> <dttm> <chr>
#> 1 2022-02-07 00:00:00 Pacific/Marquesas
#> 2 NA Pacific/Marquesas
```
<sup>Created on 2022-02-10 by the [reprex
package](https://reprex.tidyverse.org) (v2.0.1)</sup>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]