You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "thisisnic (via GitHub)" <gi...@apache.org> on 2026/04/11 19:32:22 UTC

[PR] GH-40886: [R] Cryptic error when creating Arrow array from POSIXct with invalid time zones [arrow]

thisisnic opened a new pull request, #49714:
URL: https://github.com/apache/arrow/pull/49714

   ### Rationale for this change
   
   Horrible error with invalid timezones
   
   ### What changes are included in this PR?
   
   Do more checking of type
   
   ### Are these changes tested?
   
   Yup
   
   ### Are there any user-facing changes?
   
   No
   
   ### AI usage
   
   I had Codex do this and I should give it a proper check before I mark this as ready for review


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40886: [R] Cryptic error when creating Arrow array from POSIXct with invalid time zones [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on PR #49714:
URL: https://github.com/apache/arrow/pull/49714#issuecomment-4288202910

   @jonkeane - got time to give this a quick look over?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40886: [R] Cryptic error when creating Arrow array from POSIXct with invalid time zones [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #49714:
URL: https://github.com/apache/arrow/pull/49714#issuecomment-4292351440

   After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit acd8e442939b5fbf90d0cd65ca506514ec3851c4.
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/72412533567) has more details. It also includes information about 10 possible false positives for unstable benchmarks that are known to sometimes produce them.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40886: [R] Cryptic error when creating Arrow array from POSIXct with invalid time zones [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on code in PR #49714:
URL: https://github.com/apache/arrow/pull/49714#discussion_r3118342471


##########
r/tests/testthat/test-type.R:
##########
@@ -53,6 +53,25 @@ test_that("infer_type() infers from R type", {
   )
 })
 
+test_that("infer_type() errors clearly for POSIXct with invalid tzone", {
+  x <- as.POSIXct("2019-02-14 13:55:05", tz = "UTC")
+  attr(x, "tzone") <- 123

Review Comment:
   Yeah, that's right:
   
   ```
   > as.POSIXct("2019-02-14 13:55:05", tz = 123)
   Error in `strptime()`:
   ! invalid 'tz' value
   ```
   
   Does seem odd, but I guess if people are doing unusual things with custom construction of things, it could come up? It must have as we had a user issue opened, and it was way before everyone was doing weird stuff with AI! :laughing:   



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40886: [R] Cryptic error when creating Arrow array from POSIXct with invalid time zones [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic merged PR #49714:
URL: https://github.com/apache/arrow/pull/49714


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40886: [R] Cryptic error when creating Arrow array from POSIXct with invalid time zones [arrow]

Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on code in PR #49714:
URL: https://github.com/apache/arrow/pull/49714#discussion_r3117477683


##########
r/tests/testthat/test-type.R:
##########
@@ -53,6 +53,25 @@ test_that("infer_type() infers from R type", {
   )
 })
 
+test_that("infer_type() errors clearly for POSIXct with invalid tzone", {
+  x <- as.POSIXct("2019-02-14 13:55:05", tz = "UTC")
+  attr(x, "tzone") <- 123

Review Comment:
   I assume this is because it's not possible to add the `tzone` directly, yeah? 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org