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

[R] Should be able to coerce numeric to integer with schema

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.15.0
    • R

    Description

      R is flexible when it comes to integer vs. floating point, generally obscuring the details inside a "numeric" class, but it knows how to make it seem like my integer-looking data stored in a double is actually integer. This means that an R user can think they have integers even when the underlying storage is not.

      So I would have expected this to work, and indeed to be one reason I'd want to specify a schema when creating a table:

      > table(a = 1, schema = schema(a = int32()))
      Error in Table__from_dots(dots, schema) : 
        Invalid: Cannot convert R vector of type REALSXP to integer Arrow array
      

      Attachments

        Issue Links

          Activity

            People

              romainfrancois Romain Francois
              npr Neal Richardson
              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 - 1h 10m
                  1h 10m