-
Notifications
You must be signed in to change notification settings - Fork 978
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
always unlock jval #3791
always unlock jval #3791
Changes from 1 commit
2d9051f
b13fdb4
a6bf0d1
b30e0cf
f6eda8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1265,6 +1265,8 @@ replace_order = function(isub, verbose, env) { | |
} | ||
|
||
jval = eval(jsub, SDenv, parent.frame()) | ||
.Call(Csetattrib, jval, '.data.table.locked', NULL) # in case jval inherits .SD's lock, #1341 #2245. Use .Call not setattr() to avoid bumping jval's MAYBE_REFERENCED. | ||
|
||
# copy 'jval' when required | ||
# More speedup - only check + copy if irows is NULL | ||
# Temp fix for #921 - check address and copy *after* evaluating 'jval' | ||
|
@@ -1280,11 +1282,6 @@ replace_order = function(isub, verbose, env) { | |
jval = copy(jval) # fix for #1212 | ||
} | ||
} | ||
# #2245 jval can be data.table even if is.null(irows); unlock then as well | ||
if (is.data.table(jval)) { | ||
setattr(jval, '.data.table.locked', NULL) # fix for #1341 | ||
if (!truelength(jval)) alloc.col(jval) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This commit (b13fdb4) also removed this alloc.col() which seems redundant. But it must have been covered since we have 100% R coverage, and the R coverage detects uncovered branches on the same line. So to find how it was covered I added it back with a |
||
} | ||
|
||
if (!is.null(lhs)) { | ||
# TODO?: use set() here now that it can add new columns. Then remove newnames and alloc logic above. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh thanks. i was just scratching my head about what's going on here, would've taken me quite some time to figure it out 👍