[
https://issues.apache.org/jira/browse/ARROW-15822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dragoș Moldovan-Grünfeld updated ARROW-15822:
---------------------------------------------
Description:
Edit (Dragos Moldovan-Grünfeld):
===================
Consider this reprex:
{code:java}
arrow::write_csv_arrow(data.frame(time = as.difftime(1, units="secs")),
"test.csv"){code}
This errors with:
Error: NotImplemented: Unsupported cast from duration[s] to utf8 using function
cast_string
Note that readr::write_csv() has no trouble with this (which renders the data
as "1" without a unit). Arguably the readr rendering is lossy, but then we
usually assume units are provided in other metadata anyway.
was:
Consider this reprex:
{code:java}
arrow::write_csv_arrow(data.frame(time = as.difftime(1, units="secs")),
"test.csv"){code}
This errors with:
Error: NotImplemented: Unsupported cast from duration[s] to utf8 using function
cast_string
Note that readr::write_csv() has no trouble with this (which renders the data
as "1" without a unit). Arguably the readr rendering is lossy, but then we
usually assume units are provided in other metadata anyway.
> [C++] arrow_write_csv cannot write difftime objects
> ---------------------------------------------------
>
> Key: ARROW-15822
> URL: https://issues.apache.org/jira/browse/ARROW-15822
> Project: Apache Arrow
> Issue Type: Bug
> Components: R
> Affects Versions: 7.0.0, 7.0.1
> Reporter: Carl Boettiger
> Priority: Major
>
> Edit (Dragos Moldovan-Grünfeld):
> ===================
> Consider this reprex:
> {code:java}
> arrow::write_csv_arrow(data.frame(time = as.difftime(1, units="secs")),
> "test.csv"){code}
> This errors with:
> Error: NotImplemented: Unsupported cast from duration[s] to utf8 using
> function cast_string
>
> Note that readr::write_csv() has no trouble with this (which renders the data
> as "1" without a unit). Arguably the readr rendering is lossy, but then we
> usually assume units are provided in other metadata anyway.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)