Joining the data tables:
X <- data.table(A = 1:4, B = c(1,1,1,1))
# A B
# 1: 1 1
# 2: 2 1
# 3: 3 1
# 4: 4 1
Y <- data.table(A = 4)
# A
# 1: 4
<
When doing a non-equi join like X[Y, on = .(A < A)] data.table returns the A-column from Y (the i-data.table).
To get the desired result, you could do:
X[Y, on = .(A < A), .(A = x.A, B)]
which gives:
A B 1: 1 1 2: 2 1 3: 3 1
In the next release, data.table will return both A columns. See here for the discussion.