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

[R] Permission error on Windows when deleting file previously accessed with open_dataset

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 7.0.0
    • None
    • R
    • None

    Description

      On Windows this fails:

      library(arrow)
      
      write_dataset(iris, "test_dataset")
      
      # Original example was with DuckDB, but that's not necessarily the issue
      # con <- open_dataset("test_dataset") |> to_duckdb()
      con <- open_dataset("test_dataset")$NewScan()$Finish()$ToRecordBatchReader()
      
      file.remove("test_dataset/part-0.parquet")
      #> Warning in file.remove("test_dataset/part-0.parquet"): cannot remove file
      #> 'test_dataset/part-0.parquet', reason 'Permission denied'
      #> [1] FALSE
      

      But on MacOS it does not:

      library(arrow)
      
      write_dataset(iris, "test_dataset")
      
      # Original example was with DuckDB, but that's not necessarily the issue
      # con <- open_dataset("test_dataset") |> to_duckdb()
      con <- open_dataset("test_dataset")$NewScan()$Finish()$ToRecordBatchReader()
      
      file.remove("test_dataset/part-0.parquet")
      #> [1] TRUE
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wjones127 Will Jones
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: