jonkeane commented on code in PR #46873:
URL: https://github.com/apache/arrow/pull/46873#discussion_r2159742105


##########
r/tests/testthat/test-Array.R:
##########
@@ -1397,3 +1397,9 @@ test_that("Can convert R integer/double to decimal 
(ARROW-11631)", {
     "Conversion to decimal from non-integer/double"
   )
 })
+
+test_that("Array handles sub-day precision Date correctly", {
+  d <- as.Date(-0.1)
+  arr <- arrow_array(d)
+  expect_equal(as.vector(arr), as.Date("1969-12-31"))
+})

Review Comment:
   Is it important that the sub-day precision is also a negative here? Would 
`as.Date(0.1)` exhibit the same issue?



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