In the news to 1.10.5, it says that row-ordering of non-equi joins has been fixed. However, I can't find any mention that also the row order of equi joins is changed if an index with more than the join columns is present (see also example below):
- 1.10.4 Row order of additional columns is potentially changed.
- 1.10.5 Row order of all columns is maintained.
I like the new behaviour, in fact, I was astonished, when I first saw the old behaviour, but I think this should be mentioned in the NEWS since it is a potentially breaking change.
library(data.table)
dt <- data.table(x = c(1,1), y = c(2,1))
setindex(dt, x, y)
dt[J(x=1), on = "x==x"]
## in 1.10.4
# x y
# 1: 1 1
# 2: 1 2
## in 1.10.5
# x y
# 1: 1 2
# 2: 1 1
In the news to 1.10.5, it says that row-ordering of non-equi joins has been fixed. However, I can't find any mention that also the row order of equi joins is changed if an index with more than the join columns is present (see also example below):
I like the new behaviour, in fact, I was astonished, when I first saw the old behaviour, but I think this should be mentioned in the NEWS since it is a potentially breaking change.