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

[R] Update num_rows methods to output doubles not integers to prevent integer overflow

    XMLWordPrintableJSON

Details

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

    Description

      In cases where Arrow objects are particularly large, this can result in an integer overflow when returning their size. See discussion on https://github.com/apache/arrow/pull/11783 for more details of a possible solution.

      library(arrow)
      test_array1 <- Array$create(raw(2^31 - 1))
      test_array2 <- Array$create(raw(1))
      big_chunked <- chunked_array(test_array1, test_array2)
      
      big_table <- Table$create(col = big_chunked)
      big_table$num_rows
      # NA
      

      Attachments

        Issue Links

          Activity

            People

              thisisnic Nicola Crane
              thisisnic Nicola Crane
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 2h 10m
                  2h 10m