Describe the bug, including details regarding any error messages, version, and platform.
POSIXct is tricky because you can construct one with an invalid timezone and it won't give an error until you print it:
> a = as.POSIXct(1, NA)
> print(a)
Error in as.POSIXlt.POSIXct(x, tz) : invalid 'tz' value
But at least the error itself is easily understandable. When you try to create an Arrow array from such a POSIXct, you instead get a cryptic error:
> arrow::Array$create(as.POSIXct(1, 1))
Error in vec_to_Array(x, type) :
STRING_ELT() can only be applied to a 'character vector', not a 'double'
> arrow::Array$create(as.POSIXct(1, NA))
Error in vec_to_Array(x, type) :
STRING_ELT() can only be applied to a 'character vector', not a 'logical'
Component(s)
R
Describe the bug, including details regarding any error messages, version, and platform.
POSIXct is tricky because you can construct one with an invalid timezone and it won't give an error until you print it:
But at least the error itself is easily understandable. When you try to create an Arrow array from such a POSIXct, you instead get a cryptic error:
Component(s)
R