Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-17054

[R] Creating an Array from an object bigger than 2^31 results in an Array of length 0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 11.0.0
    • R

    Description

      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.

      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
       

      Attachments

        Issue Links

          Activity

            People

              paleolimbot Dewey Dunnington
              thisisnic Nicola Crane
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m