Wainberg opened a new issue, #40886:
URL: https://github.com/apache/arrow/issues/40886

   ### 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:
   
   ```R
   > 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:
   
   ```R
   > 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


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to