解析要在 convert_array() 和 convert_array_stream() 中使用的默认 to 值。默认转换包括:
详情
null 转换为
vctrs::unspecified()boolean 转换为
logical()int8、uint8、int16、uint16 和 int13 转换为
integer()uint32、int64、uint64、float 和 double 转换为
double()string 和 large string 转换为
character()struct 转换为
data.frame()binary 和 large binary 转换为
blob::blob()list、large_list 和 fixed_size_list 转换为
vctrs::list_of()time32 和 time64 转换为
hms::hms()duration 转换为
difftime()date32 转换为
as.Date()timestamp 转换为
as.POSIXct()
通过为 to 指定显式值,可以实现额外的转换。有关每个转换的详细信息,请参阅 convert_array()。
示例
infer_nanoarrow_ptype(as_nanoarrow_array(1:10))
#> integer(0)