[ https://issues.apache.org/jira/browse/ARROW-17054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17646223#comment-17646223 ]
Dewey Dunnington commented on ARROW-17054: ------------------------------------------ I suspect that (as always) Antoine is correct...this is probably a bad cast on the R side. A reprex using {{raw()}} instead of {{logical()}} (less likely to crash due to out-of-memory because raws are 4x smaller than logicals in R): {code:R} library(arrow, warn.conflicts = FALSE) #> Some features are not enabled in this build of Arrow. Run `arrow_info()` for more information. # works - creates a huge array, hurrah big_raw <- vector(mode = "raw", length = .Machine$integer.max) big_raw_array <- Array$create(big_raw) length(big_raw) #> [1] 2147483647 length(big_raw_array) #> [1] 2147483647 # creates an array of length 0, boo! too_big <- vector(mode = "raw", length = .Machine$integer.max + 1) too_big_array <- Array$create(too_big) length(too_big) #> [1] 2147483648 length(too_big_array) #> [1] 0 {code} > [R] Creating an Array from an object bigger than 2^31 results in an Array of > length 0 > ------------------------------------------------------------------------------------- > > Key: ARROW-17054 > URL: https://issues.apache.org/jira/browse/ARROW-17054 > Project: Apache Arrow > Issue Type: Bug > Components: R > Reporter: Nicola Crane > Priority: Major > > Apologies for the lack of proper reprex but it crashes my session when I try > to make one. > I'm working on ARROW-16977 which is all about the reporting of object size > having integer overflow issues, but this affects object creation. > {code:r} > library(arrow, warn.conflicts = TRUE) > # works - creates a huge array, hurrah > big_logical <- vector(mode = "logical", length = .Machine$integer.max) > big_logical_array <- Array$create(big_logical) > length(big_logical) > ## [1] 2147483647 > length(big_logical_array) > ## [1] 2147483647 > # creates an array of length 0, boo! > too_big <- vector(mode = "logical", length = .Machine$integer.max + 1) > too_big_array <- Array$create(too_big) > length(too_big) > ## [1] 2147483648 > length(too_big_array) > ## [1] 0 > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)