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

[R] copying dataset and immediatly writing the copy to a different location fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 9.0.0
    • None
    • R
    • None
    • Ubuntu 22.04

    Description

      When I copy large feather files, open a dataset from that file and immediately write that dataset to a new location I get the following error:

       

      ```Error: Invalid: Expected to read 144 metadata bytes but got 0```

       

      I have made a reproducible example below:

       

      ``` r
      df <- data.frame(replicate(1,sample(0:1,100e6,rep=TRUE)))
      savePath <- file.path(tempdir(), 'arrowTest')
      if (!dir.exists(savePath))

      {   dir.create(savePath) }

      arrow::write_feather(df, file.path(savePath, 'part-0.feather'))

      copyPath <- file.path(tempdir(),'arrowTest')
      if (!dir.exists(copyPath))

      {   dir.create(copyPath) }

      writePath <- file.path(tempdir(), 'arrowTest')
      if (!dir.exists(writePath))

      {   dir.create(writePath) }

      arrow::copy_files(savePath, copyPath)

      dataset <- arrow::open_dataset(copyPath, format='feather')
      arrow::write_dataset(dataset = dataset, path = writePath, format = 'feather')
      ```

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              egillax Egill Axfjord Fridgeirsson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: