Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
f <- as.POSIXlt(Sys.time() + 1:5) Array$create(f) # Error in Array__from_vector(x, type) : # Unknown: List vector expecting elements vector of type double but got int32
Issue #1: POSIXlt type is a struct, essentially. But because it is not a data.frame, we don't try to convert it to a struct. (We should probably convert named lists to structs and not list type in general.)
If I trick the converter into thinking it is a data.frame, it will convert to struct successfully.
class(f) <- c(class(f), "data.frame") Array$create(f) # StructArray # <struct<sec: double, min: int32, hour: int32, mday: int32, mon: int32, year: int32, wday: int32, yday: int32, isdst: int32, zone: string, gmtoff: int32>> # ...
Issue #2: round trip won't work because the attributes that tell you that this struct is a POSIXlt type, what time zone it is, etc., are dropped. This would be helped by storing those attributes as custom_metadata on the Table. (We could also implement it as an extension type, but if it's just for going back and forth between R, would that have any benefit?)
Attachments
Issue Links
- depends upon
-
ARROW-8899 [R] Add R metadata like pandas metadata for round-trip fidelity
- Resolved
- links to