-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Don't overwrite indexes for region writes, always #8589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Very much agree! IIRC, currently it's disallowed to write indexes that don't contain the region (writing any var that doesn't contain the region is disallowed) So this is only an issue for indexes which do contain the region. Historically the index would generally have been dropped manually; makes sense to exclude it. (I also thought about whether this was an issue for other variables which had fewer bigger chunks. But actually this is disallowed in zarr, it's only the index that can have different chunks) |
There was a bunch of discussion about this on #8434 - I'm in favor. I decided to take the smaller step on that PR for only |
* Don't allow overwriting indexes with region writes Closes #8589 * Fix typing * one more typing fix
What happened?
Currently we don't overwrite indexes when
region="auto"
xarray/xarray/backends/api.py
Lines 1769 to 1770 in e6ccedb
I propose we do this for all region writes and completely disallow modifying indexes with a region write.
This would match the
map_blocks
model, where all indexes are specified in thetemplate
and no changes by the mapped function are allowed.The text was updated successfully, but these errors were encountered: