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

Comments

Projects
None yet
3 participants
@arunsrinivasan
Member

arunsrinivasan commented Jun 8, 2014

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

Description here.

@arunsrinivasan arunsrinivasan added the High label Jun 10, 2014

@arunsrinivasan

This comment has been minimized.

Show comment
Hide comment
@arunsrinivasan

arunsrinivasan Jun 10, 2014

Member

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.

Member

arunsrinivasan commented Jun 10, 2014

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

This comment has been minimized.

Show comment
Hide comment
@nachti

nachti Jun 11, 2014

Contributor

Thanks for the migration from R-Forge!

Contributor

nachti commented Jun 11, 2014

Thanks for the migration from R-Forge!

@arunsrinivasan arunsrinivasan added this to the v1.9.4 milestone Jun 19, 2014

@arunsrinivasan arunsrinivasan modified the milestones: 2.0.2, v2.0 Sep 6, 2014

@arunsrinivasan arunsrinivasan modified the milestones: v1.9.6, v1.9.8 Oct 10, 2014

@arunsrinivasan arunsrinivasan modified the milestones: v1.9.6, v1.9.8 Jul 18, 2015

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