-
Notifications
You must be signed in to change notification settings - Fork 977
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
inconsistent output of add column on join #1166
Comments
Maybe a relevant excerpt from the news/changelog for 1.9.2: "X[Y, col:=value] when no match exists in the join is now caught early and X is simply returned. Also a message when datatable.verbose is TRUE is provided. In addition, if col is an existing column, since no update actually takes place, the key is now retained." in response to #354 |
Possible duplicate of #820. A PR would be great for this. IIRC we've to not return when |
Another case, more problematic as cannot be easily fixed by library(data.table)
d1 <- data.table(a="a",b=FALSE,x=1,key=c("a","b"))
d2 <- data.table(a="a",b=TRUE,x=5,key=c("a","b"))
d1[d2, x := i.x]
# a b x
# 1: a FALSE 1
## while I would expect to get
# a b x
# 1: a FALSE NA |
Duplicate of #759, closing |
See the example and comment below.
That looks OK.
That looks not OK.
I would expect to get:
Of course it should also retain data types, so
NA_real_
in that caseThe text was updated successfully, but these errors were encountered: