thisisnic commented on code in PR #49619:
URL: https://github.com/apache/arrow/pull/49619#discussion_r3027737076


##########
r/src/r_to_arrow.cpp:
##########
@@ -93,6 +93,8 @@ RVectorType GetVectorType(SEXP x) {
         return FACTOR;
       } else if (Rf_inherits(x, "Date")) {
         return DATE_INT;
+      } else if (Rf_inherits(x, "POSIXct")) {
+        return POSIXCT;

Review Comment:
   :robot: says that it's not new, but historically, `POSIXct` was always 
`REALSXP` (backed by a double) until R 4.5.2, but now for zero-length `POSIXct` 
objects that's no longer the case, so it needs checking in the `INTSXP` path.
   
   Or, with more detail:
   
   > So in R 4.5.0, R changed as.POSIXct({}) (i.e., zero-length POSIXct) to be 
internally stored as integer (INTSXP) rather than double (REALSXP). This is a 
deliberate change for consistency - zero-length date-time objects don't need 
the full double precision since they have no actual values to store. 



-- 
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