Skip to content
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

[R-Forge #5659] key is not retained after join on factor columns #477

Closed
arunsrinivasan opened this issue Jun 8, 2014 · 2 comments
Closed
Assignees
Milestone

Comments

@arunsrinivasan
Copy link
Member

Submitted by: Gerhard Nachtmann; Assigned to: Nobody; R-Forge link

Description here.

@arunsrinivasan
Copy link
Member Author

It's not just on factor columns. It's basically due to recent changes in 1.9.3 in this part of [.data.table:

if (haskey(x)) {
    keylen = which.first(!key(x) %chin% ansvars)-1L
    if (is.na(keylen)) keylen = length(key(x))
    if (keylen > length(rightcols) && !.Call(CisOrderedSubset, irows, nrow(x))) keylen = length(rightcols)
    if (keylen && ((is.data.table(i) && haskey(i)) || is.logical(i) || .Call(CisOrderedSubset, irows, nrow(x))))
        setattr(ans,"sorted",head(key(x),keylen))
}

Here CisOrderedSubset doesn't provide required result when there's NA (IIRC from debugging it sometime back).

And IIUC, this is how it was before.

@nachti
Copy link
Contributor

nachti commented Jun 11, 2014

Thanks for the migration from R-Forge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants