You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[R] existing_data_behavior = "overwrite" does not work as expected in arrow::write_dataset #37760
changed the title [-]existing_data_behavior = "overwrite" does not work as expected in arrow::write_dataset[/-][+][R] existing_data_behavior = "overwrite" does not work as expected in arrow::write_dataset[/+]on Sep 18, 2023
(sorry for the incorrect link up there, too many tabs open, apparently!)
Ah, I see what's going on here. In the overwrite mode we anticipated someone was overwriting a dataset with the same partitioning. If I remember correctly, the way that we delete files in overwrite mode, the C++ looks for the folders the partitions would create and then deletes the files inside of those. But if you write with a new partitioning, it doesn't look in other folders that might exist.
There are a few things we could do (and these aren't necessarily mutually exclusive):
Update the documentation to explain this
Add a check in either R or C++ to check if the data directory is empty or contains what looks like a dataset and either warn or remove things
Activity
[-]existing_data_behavior = "overwrite" does not work as expected in arrow::write_dataset[/-][+][R] existing_data_behavior = "overwrite" does not work as expected in arrow::write_dataset[/+]jonkeane commentedon Sep 18, 2023
(sorry for the incorrect link up there, too many tabs open, apparently!)
Ah, I see what's going on here. In the overwrite mode we anticipated someone was overwriting a dataset with the same partitioning. If I remember correctly, the way that we delete files in overwrite mode, the C++ looks for the folders the partitions would create and then deletes the files inside of those. But if you write with a new partitioning, it doesn't look in other folders that might exist.
There are a few things we could do (and these aren't necessarily mutually exclusive):