You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "eitsupi (via GitHub)" <gi...@apache.org> on 2023/05/09 12:35:12 UTC
[GitHub] [arrow] eitsupi opened a new issue, #35510: [R] Support interval type
eitsupi opened a new issue, #35510:
URL: https://github.com/apache/arrow/issues/35510
### Describe the enhancement requested
It seems to lack the ability to convert Arrow Interval type to R.
For example, the following is a Python example of how an Interval type can be written to an Arrow file.
```python
import pyarrow as pa
import pyarrow.feather as feather
tbl=pa.table([pa.array([(1, 15, -30)], type=pa.month_day_nano_interval())],
names="x")
feather.write_feather(tbl, "test.arrow")
```
This file can be read in R, but cannot be converted to R type.
```r
> arrow::read_feather("test.arrow")
Error: cannot handle Array of type <month_day_nano_interval>
> arrow::read_feather("test.arrow", as_data_frame = FALSE)$x
ChunkedArray
<month_day_nano_interval>
[
[
1M15d-30ns
]
]
```
But this type looks like lubridate's Period type, so perhaps it can be converted to this?
```r
> lubridate::period(c(1, 15, -30e-9), c("month", "day", "second"))
[1] "1m 15d 0H 0M -3e-08S"
```
### Component(s)
R
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] eitsupi commented on issue #35510: [R] Support interval type
Posted by "eitsupi (via GitHub)" <gi...@apache.org>.
eitsupi commented on issue #35510:
URL: https://github.com/apache/arrow/issues/35510#issuecomment-1540047047
Sorry, it seems duplicate of #29433
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] eitsupi closed issue #35510: [R] Support interval type
Posted by "eitsupi (via GitHub)" <gi...@apache.org>.
eitsupi closed issue #35510: [R] Support interval type
URL: https://github.com/apache/arrow/issues/35510
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org