html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/4077#issuecomment-630721808,https://api.github.com/repos/pydata/xarray/issues/4077,630721808,MDEyOklzc3VlQ29tbWVudDYzMDcyMTgwOA==,10194086,2020-05-19T10:06:10Z,2020-05-19T10:06:10Z,MEMBER,"The second part could probably be tested just below this `if`:
https://github.com/pydata/xarray/blob/2542a63f6ebed1a464af7fc74b9f3bf302925803/xarray/core/combine.py#L751
using
```python
if not indexes.is_unique:
raise ValueError("""")
```
(or a warning)
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,620514214
https://github.com/pydata/xarray/issues/4077#issuecomment-630713011,https://api.github.com/repos/pydata/xarray/issues/4077,630713011,MDEyOklzc3VlQ29tbWVudDYzMDcxMzAxMQ==,10194086,2020-05-19T09:47:33Z,2020-05-19T09:47:33Z,MEMBER,"Raising an error when the start time is equal is certainly a good idea. What I am less sure about is what to do when the end is equal to the start - maybe a warning?
The second case would be the following:
```python
print(ds0)
print(ds1)
```
```
Dimensions: (x: 2)
Coordinates:
* x (x) int64 0 1
Data variables:
foo ...
Dimensions: (x: 2)
Coordinates:
* x (x) int64 1 2
Data variables:
foo ...
```
and `auto_combine` would lead to:
```python
xr.combine_by_coords([ds0, ds1])
```
```
Dimensions: (x: 2)
Coordinates:
* x (x) int64 0 1 1 2
Data variables:
foo ...
```
For the first case you can probably check if all elements of `order` are unique:
https://github.com/pydata/xarray/blob/2542a63f6ebed1a464af7fc74b9f3bf302925803/xarray/core/combine.py#L99
ps: Overlapping indices are not a problem - it is checked that the result is monotonic:
https://github.com/pydata/xarray/blob/2542a63f6ebed1a464af7fc74b9f3bf302925803/xarray/core/combine.py#L748
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,620514214
https://github.com/pydata/xarray/issues/4077#issuecomment-630644504,https://api.github.com/repos/pydata/xarray/issues/4077,630644504,MDEyOklzc3VlQ29tbWVudDYzMDY0NDUwNA==,10194086,2020-05-19T07:40:11Z,2020-05-19T07:40:11Z,MEMBER,"Yes, `xr.combine_by_coords` only ensures that the coordinates are monotonically increasing. It does not check that they (a) don't have the same start (your case) and (b) if the end of `ds0` is equal to the start of `ds1` (which may also be undesirable).
The magic happens here:
https://github.com/pydata/xarray/blob/2542a63f6ebed1a464af7fc74b9f3bf302925803/xarray/core/combine.py#L49
In your case it just uses the rightmost array (compare `xr.combine_by_coords([ds0, ds1])` and `xr.combine_by_coords([ds1, ds0])`.
(Note that `concat_dim=""y""` is ignored when using `combine_by_coords`).
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,620514214