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

[R] crashes when reading empty feather with POSIXct column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 5.0.0
    • 6.0.0
    • R
    • None

    Description

      R crashes when writing and then reading an empty feather with at least one POSIXct column.

      # Create empty df with one POSIXct column
      dates <- as.POSIXct(character())
      values <- numeric()
      df_empty <- data.frame(dates, values)
      
      df_empty
      # [1] dates  values
      # <0 rows> (or 0-length row.names)
      
      sapply(df_empty, class)
      # $dates
      # [1] "POSIXct" "POSIXt" 
      #
      # $values
      # [1] "numeric"
      
      # Write and read -> R crashes
      tempfile <- tempfile()
      arrow::write_feather(df_empty, tempfile)
      
      df_restored <- arrow::read_feather(tempfile)
      # >> R crashes here. Tested on 3.6.3 & 4.1.1 for windows and Linux.
      
      unlink(tempfile)
      
      
      

      At times, in RStudio, this message is displayed when R crashes.
       
       

      Tested on Windows (R version 3.6.3 and 4.1.1) and Linux (R 3.6.3). 

      # TESTED ON WINDOWS 
      Arrow ‘5.0.0.2’ 
      R version 3.6.3 (2020-02-29) 
      Platform: x86_64-w64-mingw32/x64 (64-bit) 
      Running under: Windows 10 x64 (build 19043)
      
      R version 4.1.1 (2021-08-10) 
      Platform: i386-w64-mingw32/i386 (32-bit) 
      Running under: Windows 10 x64 (build 19043)
      
      # TESTED ON LINUX 
      Arrow ‘5.0.0.2’ 
      R version 3.6.3 (2020-02-29) 
      Platform: x86_64-pc-linux-gnu (64-bit) 
      # Running under: Debian GNU/Linux 10 (buster)
      

      Attachments

        Issue Links

          Activity

            People

              npr Neal Richardson
              Idefer Damiano
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: